-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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-11706][Streaming]Fix the bug that Streaming Python tests cannot report failures #9669
Conversation
Manually tested this patch locally by adding |
for testcase in testcases: | ||
sys.stderr.write("[Running %s]\n" % (testcase)) | ||
tests = unittest.TestLoader().loadTestsFromTestCase(testcase) | ||
if xmlrunner: | ||
unittest.main(tests, verbosity=3, |
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.
unittest.main
will call sys.exit after finishing tests, so we should not use it here.
Test build #45753 has finished for PR 9669 at commit
|
Test build #45759 has finished for PR 9669 at commit
|
No surprises. Exposed a lot of test failures. Fixing them |
Test build #45776 has finished for PR 9669 at commit
|
@@ -611,12 +611,15 @@ class CheckpointTests(unittest.TestCase): | |||
@staticmethod | |||
def tearDownClass(): | |||
# Clean up in the JVM just in case there has been some issues in Python API | |||
jStreamingContextOption = StreamingContext._jvm.SparkContext.getActive() |
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.
Why this change?
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.
StreamingContext doesn't have a static _jvm
. It's an instance field.
Test build #45784 has finished for PR 9669 at commit
|
Merging this to master, 1.6 and 1.5. Thanks @zsxwing for catching this. |
…ot report failures This PR just checks the test results and returns 1 if the test fails, so that `run-tests.py` can mark it fail. Author: Shixiong Zhu <shixiong@databricks.com> Closes #9669 from zsxwing/streaming-python-tests. (cherry picked from commit ec80c0c) Signed-off-by: Tathagata Das <tathagata.das1565@gmail.com>
…ot report failures This PR just checks the test results and returns 1 if the test fails, so that `run-tests.py` can mark it fail. Author: Shixiong Zhu <shixiong@databricks.com> Closes apache#9669 from zsxwing/streaming-python-tests.
This PR just checks the test results and returns 1 if the test fails, so that
run-tests.py
can mark it fail.