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

    https://github.com/apache/spark/pull/8818#discussion_r40180819
  
    --- Diff: 
streaming/src/test/scala/org/apache/spark/streaming/StreamingListenerSuite.scala
 ---
    @@ -140,6 +140,89 @@ class StreamingListenerSuite extends TestSuiteBase 
with Matchers {
         }
       }
     
    +  test("onBatchCompleted with successful batch") {
    +    ssc = new StreamingContext("local[2]", "test", Milliseconds(1000))
    +    val inputStream = ssc.receiverStream(new 
StreamingListenerSuiteReceiver)
    +    inputStream.foreachRDD(_.count)
    +
    +    @volatile var failureReasons: Map[Int, String] = null
    +    ssc.addStreamingListener(new StreamingListener {
    +      override def onBatchCompleted(batchCompleted: 
StreamingListenerBatchCompleted): Unit = {
    --- End diff --
    
    I wonder whether some of the duplicate statements across these unit tests 
can be reduced. E.g. this StreamingListener can be a common class. 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to