Skip to content

Commit f945b64

Browse files
robbinsAndrew Or
authored andcommitted
[SPARK-9869] [STREAMING] Wait for all event notifications before asserting results
Author: robbins <[email protected]> Closes #8589 from robbinspg/InputStreamSuite-fix. (cherry picked from commit 754f853) Signed-off-by: Andrew Or <[email protected]>
1 parent f01a967 commit f945b64

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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)