Repository: spark Updated Branches: refs/heads/master d911c682f -> 754f853b0
[SPARK-9869] [STREAMING] Wait for all event notifications before asserting results Author: robbins <[email protected]> Closes #8589 from robbinspg/InputStreamSuite-fix. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/754f853b Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/754f853b Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/754f853b Branch: refs/heads/master Commit: 754f853b02e9fd221f138c2446445fd56e3f3fb3 Parents: d911c68 Author: robbins <[email protected]> Authored: Thu Sep 3 13:48:35 2015 -0700 Committer: Andrew Or <[email protected]> Committed: Thu Sep 3 13:48:35 2015 -0700 ---------------------------------------------------------------------- .../test/scala/org/apache/spark/streaming/InputStreamsSuite.scala | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/754f853b/streaming/src/test/scala/org/apache/spark/streaming/InputStreamsSuite.scala ---------------------------------------------------------------------- diff --git a/streaming/src/test/scala/org/apache/spark/streaming/InputStreamsSuite.scala b/streaming/src/test/scala/org/apache/spark/streaming/InputStreamsSuite.scala index ec2852d..047e38e 100644 --- a/streaming/src/test/scala/org/apache/spark/streaming/InputStreamsSuite.scala +++ b/streaming/src/test/scala/org/apache/spark/streaming/InputStreamsSuite.scala @@ -76,6 +76,9 @@ class InputStreamsSuite extends TestSuiteBase with BeforeAndAfter { fail("Timeout: cannot finish all batches in 30 seconds") } + // Ensure progress listener has been notified of all events + ssc.scheduler.listenerBus.waitUntilEmpty(500) + // Verify all "InputInfo"s have been reported assert(ssc.progressListener.numTotalReceivedRecords === input.size) assert(ssc.progressListener.numTotalProcessedRecords === input.size) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
