Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/3687#discussion_r21949136
--- Diff:
streaming/src/test/scala/org/apache/spark/streaming/TestSuiteBase.scala ---
@@ -286,22 +359,23 @@ trait TestSuiteBase extends FunSuite with
BeforeAndAfter with Logging {
val output = outputStream.output
try {
+ val waiter = new StreamingTestWaiter(ssc)
// Start computation
ssc.start()
// Advance manual clock
val clock = ssc.scheduler.clock.asInstanceOf[ManualClock]
- logInfo("Manual clock before advancing = " + clock.time)
+ logInfo("Manual clock before advancing = " + clock.currentTime())
if (actuallyWait) {
for (i <- 1 to numBatches) {
logInfo("Actually waiting for " + batchDuration)
clock.addToTime(batchDuration.milliseconds)
- Thread.sleep(batchDuration.milliseconds)
--- End diff --
I assumed that the reason for this actual sleep call was for waiting on
batches to complete, but maybe that's not true... what if we had a test which
tried to test what happens when we have a batch which takes much longer than
the `batchDuration` to complete? I think my change would break that test, so
maybe this isn't the right scope for this change.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]