tdas commented on a change in pull request #26771: [SPARK-30143][SS] Add a 
timeout on stopping a streaming query
URL: https://github.com/apache/spark/pull/26771#discussion_r356482600
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamSuite.scala
 ##########
 @@ -1125,6 +1126,37 @@ class StreamSuite extends StreamTest {
       }
     )
   }
+
+  // ProcessingTime trigger generates MicroBatchExecution, and 
ContinuousTrigger starts a
+  // ContinuousExecution
+  Seq(Trigger.ProcessingTime("1 second"), Trigger.Continuous("1 
second")).foreach { trigger =>
+    test(s"SPARK-30143: stop waits until timeout if blocked - trigger: 
$trigger") {
+      val latch = new CountDownLatch(1)
+      BlockOnStopSourceProvider.setLatch(latch)
 
 Review comment:
   super nit: the latch can be hidden in the implementation, behind two simple 
APIs, `enableBlocking` and `disableBlocking`. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to