[SPARK-9869] [STREAMING] Wait for all event notifications before asserting results
Author: robbins <robbins@uk.ibm.com> Closes #8589 from robbinspg/InputStreamSuite-fix.
This commit is contained in:
parent
d911c682f0
commit
754f853b02
|
@ -76,6 +76,9 @@ class InputStreamsSuite extends TestSuiteBase with BeforeAndAfter {
|
||||||
fail("Timeout: cannot finish all batches in 30 seconds")
|
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
|
// Verify all "InputInfo"s have been reported
|
||||||
assert(ssc.progressListener.numTotalReceivedRecords === input.size)
|
assert(ssc.progressListener.numTotalReceivedRecords === input.size)
|
||||||
assert(ssc.progressListener.numTotalProcessedRecords === input.size)
|
assert(ssc.progressListener.numTotalProcessedRecords === input.size)
|
||||||
|
|
Loading…
Reference in a new issue