Github user jose-torres commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21199#discussion_r189063593
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/sources/TextSocketStreamSuite.scala
 ---
    @@ -256,7 +258,101 @@ class TextSocketStreamSuite extends StreamTest with 
SharedSQLContext with Before
         }
       }
     
    -  private class ServerThread extends Thread with Logging {
    +  test("continuous data") {
    +    serverThread = new ServerThread()
    +    serverThread.start()
    +
    +    val reader = new TextSocketContinuousReader(
    +      new DataSourceOptions(Map("numPartitions" -> "2", "host" -> 
"localhost",
    +        "port" -> serverThread.port.toString).asJava))
    +    reader.setStartOffset(Optional.empty())
    +    val tasks = reader.planInputPartitions()
    +    assert(tasks.size == 2)
    +
    +    val numRecords = 10
    +    val data = scala.collection.mutable.ListBuffer[Int]()
    +    val offsets = scala.collection.mutable.ListBuffer[Int]()
    +    import org.scalatest.time.SpanSugar._
    +    failAfter(5 seconds) {
    --- End diff --
    
    Can't we use testStream for these tests?


---

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

Reply via email to