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

    https://github.com/apache/spark/pull/22337#discussion_r216033347
  
    --- Diff: 
external/kafka-0-8/src/test/scala/org/apache/spark/streaming/kafka/KafkaStreamSuite.scala
 ---
    @@ -35,19 +35,24 @@ class KafkaStreamSuite extends SparkFunSuite with 
Eventually with BeforeAndAfter
       private var kafkaTestUtils: KafkaTestUtils = _
     
       override def beforeAll(): Unit = {
    +    super.beforeAll()
         kafkaTestUtils = new KafkaTestUtils
         kafkaTestUtils.setup()
       }
     
       override def afterAll(): Unit = {
    -    if (ssc != null) {
    -      ssc.stop()
    -      ssc = null
    -    }
    +    try {
    +      if (ssc != null) {
    +        ssc.stop()
    +        ssc = null
    +      }
     
    -    if (kafkaTestUtils != null) {
    -      kafkaTestUtils.teardown()
    -      kafkaTestUtils = null
    +      if (kafkaTestUtils != null) {
    +        kafkaTestUtils.teardown()
    +        kafkaTestUtils = null
    +      }
    +    } finally {
    +      super.afterAll()
    --- End diff --
    
    @kiszk same question as above.


---

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

Reply via email to