Skip to content

Commit 460d3c5

Browse files
robbinsMarcelo Vanzin
authored andcommitted
[SPARK-9869] [STREAMING] Wait for all event notifications before asserting results
Author: robbins <robbins@uk.ibm.com> Closes apache#8589 from robbinspg/InputStreamSuite-fix. (cherry picked from commit 754f853) Signed-off-by: Andrew Or <andrew@databricks.com> (cherry picked from commit f945b64)
1 parent aa75b4c commit 460d3c5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

streaming/src/test/scala/org/apache/spark/streaming/InputStreamsSuite.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ class InputStreamsSuite extends TestSuiteBase with BeforeAndAfter {
7676
fail("Timeout: cannot finish all batches in 30 seconds")
7777
}
7878

79+
// Ensure progress listener has been notified of all events
80+
ssc.scheduler.listenerBus.waitUntilEmpty(500)
81+
7982
// Verify all "InputInfo"s have been reported
8083
assert(ssc.progressListener.numTotalReceivedRecords === input.size)
8184
assert(ssc.progressListener.numTotalProcessedRecords === input.size)

0 commit comments

Comments
 (0)