Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6294#discussion_r30841651
  
    --- Diff: 
streaming/src/test/scala/org/apache/spark/streaming/StreamingContextSuite.scala 
---
    @@ -224,6 +224,19 @@ class StreamingContextSuite extends FunSuite with 
BeforeAndAfter with Timeouts w
         }
       }
     
    +  test("stop gracefully even if a receiver misses StopReceiver") {
    +    val conf = new SparkConf().setMaster(master).setAppName(appName)
    +    sc = new SparkContext(conf)
    +    ssc = new StreamingContext(sc, Milliseconds(100))
    +    val input = ssc.receiverStream(new TestReceiver)
    +    input.foreachRDD(_ => {})
    +    ssc.start()
    +    // Call `ssc.stop` at once so that it's possible that the receiver 
will miss "StopReceiver"
    +    failAfter(30000 millis) {
    --- End diff --
    
    How is this test deterministic? I dont see how it is guaranteed to test the 
situation where the context is stopped before the receiver has started?


---
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]

Reply via email to