Github user lw-lin commented on a diff in the pull request:
https://github.com/apache/spark/pull/15497#discussion_r83570798
--- Diff: core/src/main/scala/org/apache/spark/util/ManualClock.scala ---
@@ -27,6 +27,7 @@ package org.apache.spark.util
private[spark] class ManualClock(private var time: Long) extends Clock {
private var _isWaiting = false
+ private var _readyForFirstPeek = false
--- End diff --
`_isWaiting` indicates the main `StreamExecution` thread is waiting, while
`_readyForFirstPeek` is supposed to indicate whether it's **the first time**
the **test thread** knows about the main thread is waiting.
When it's a second time or a third time the test thread knows the main
thread is waiting via `isWaitingAndReadyForFirstPeek()`, the test thread itself
should block to prevent `advance()`ing too early.
---
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]