New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-27101][PYTHON] Drop the created database after the test in test_session #24021
Conversation
this is required for 22466. Python testcases are failing |
self.assertEqual(spark.range(3).count(), 3) | ||
finally: | ||
spark.stop() | ||
with self.database("test_db"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it because the database wasn't cleaned? In that case, you can just add class SparkSessionTests3(unittest.TestCase, SQLTestUtils):
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SQLTestUtils excepts spark session to be present Code here. So have ReusedSQLTestCase which will create spark session and inherits unittest.TestCase, SQLTestUtils
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This set of tests are specific to Spark sessions. Let's don't make another Spark session before the tests. You can just manually drop the database explicitly in finally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handled
ok to test |
Test build #103205 has finished for PR 24021 at commit
|
4dbda53
to
d9fcaec
Compare
retest this please |
Test build #103208 has finished for PR 24021 at commit
|
What changes were proposed in this pull request?
Cleaning the testcase, drop the database after use
How was this patch tested?
existing UT