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

    https://github.com/apache/spark/pull/6294#discussion_r34882516
  
    --- 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 --
    
    I ran `StreamingContextSuite` 100 times locally and it didn't fail. 
`StreamingContextSuite` needs about 40 seconds, so I only ran 100 times.


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