@@ -167,8 +167,7 @@ trait StreamTest extends QueryTest with SharedSQLContext with Timeouts {
167167 extends StreamAction
168168
169169 /** Advance the trigger clock's time manually. */
170- case class AdvanceManualClock (
171- timeToAdd : Long , waitForStreamExecThreadToBlock : Boolean = true ) extends StreamAction
170+ case class AdvanceManualClock (timeToAdd : Long ) extends StreamAction
172171
173172 /** Signals that a failure is expected and should not kill the test. */
174173 case class ExpectFailure [T <: Throwable : ClassTag ]() extends StreamAction {
@@ -365,19 +364,19 @@ trait StreamTest extends QueryTest with SharedSQLContext with Timeouts {
365364 }
366365 })
367366
368- case AdvanceManualClock (timeToAdd, waitForStreamExecThreadToBlock ) =>
367+ case AdvanceManualClock (timeToAdd) =>
369368 verify(currentStream != null ,
370369 " can not advance manual clock when a stream is not running" )
371370 verify(currentStream.triggerClock.isInstanceOf [StreamManualClock ],
372371 s " can not advance clock of type ${currentStream.triggerClock.getClass}" )
373372 val clock = currentStream.triggerClock.asInstanceOf [StreamManualClock ]
374373 assert(manualClockExpectedTime >= 0 )
375- if (waitForStreamExecThreadToBlock) {
376- // Make sure we don't advance ManualClock too early. See SPARK-16002.
377- eventually(" StreamManualClock has not yet entered the waiting state" ) {
378- assert(clock.isStreamWaitingAt(manualClockExpectedTime))
379- }
374+
375+ // Make sure we don't advance ManualClock too early. See SPARK-16002.
376+ eventually(" StreamManualClock has not yet entered the waiting state" ) {
377+ assert(clock.isStreamWaitingAt(manualClockExpectedTime))
380378 }
379+
381380 clock.advance(timeToAdd)
382381 manualClockExpectedTime += timeToAdd
383382 verify(clock.getTimeMillis() === manualClockExpectedTime,
0 commit comments