Skip to content
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

Closed
wants to merge 6 commits into from
Closed

[SPARK-11706][Streaming]Fix the bug that Streaming Python tests cannot report failures #9669

wants to merge 6 commits into from

Conversation

zsxwing
Copy link
Member

@zsxwing zsxwing commented Nov 12, 2015

This PR just checks the test results and returns 1 if the test fails, so that run-tests.py can mark it fail.

@zsxwing
Copy link
Member Author

zsxwing commented Nov 12, 2015

Manually tested this patch locally by adding 1 / 0 to test_map. It did report the failure after applying this patch.

for testcase in testcases:
sys.stderr.write("[Running %s]\n" % (testcase))
tests = unittest.TestLoader().loadTestsFromTestCase(testcase)
if xmlrunner:
unittest.main(tests, verbosity=3,
Copy link
Member Author

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.

@SparkQA
Copy link

SparkQA commented Nov 12, 2015

Test build #45753 has finished for PR 9669 at commit bbfea87.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Nov 12, 2015

Test build #45759 has finished for PR 9669 at commit 1f3764b.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@zsxwing
Copy link
Member Author

zsxwing commented Nov 12, 2015

No surprises. Exposed a lot of test failures. Fixing them

@SparkQA
Copy link

SparkQA commented Nov 12, 2015

Test build #45776 has finished for PR 9669 at commit 08d0f60.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@@ -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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Member Author

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.

@SparkQA
Copy link

SparkQA commented Nov 12, 2015

Test build #45784 has finished for PR 9669 at commit a5699e0.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@tdas
Copy link
Contributor

tdas commented Nov 13, 2015

Merging this to master, 1.6 and 1.5. Thanks @zsxwing for catching this.

asfgit pushed a commit that referenced this pull request Nov 13, 2015
…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>
@asfgit asfgit closed this in ec80c0c Nov 13, 2015
dskrvk pushed a commit to dskrvk/spark that referenced this pull request Nov 13, 2015
…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.
@zsxwing zsxwing deleted the streaming-python-tests branch November 13, 2015 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants