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

    https://github.com/apache/spark/pull/20096#discussion_r160008897
  
    --- Diff: 
external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaContinuousSuite.scala
 ---
    @@ -0,0 +1,248 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.sql.kafka010
    +
    +import java.util.Properties
    +
    +import org.scalatest.time.SpanSugar._
    +import scala.collection.mutable
    +import scala.util.Random
    +
    +import org.apache.spark.SparkContext
    +import org.apache.spark.sql.{ForeachWriter, Row}
    +import org.apache.spark.sql.execution.datasources.v2.DataSourceV2Relation
    +import 
org.apache.spark.sql.execution.streaming.{ContinuousExecutionRelation, 
StreamingExecutionRelation, StreamingQueryWrapper}
    +import 
org.apache.spark.sql.execution.streaming.continuous.ContinuousExecution
    +import org.apache.spark.sql.streaming.Trigger
    +import org.apache.spark.sql.test.{SharedSQLContext, TestSparkSession}
    +
    +class KafkaContinuousSuite extends KafkaSourceTest with SharedSQLContext {
    +  import testImplicits._
    +
    +  // We need more than the default local[2] to be able to schedule all 
partitions simultaneously.
    +  override protected def createSparkSession = new TestSparkSession(
    +    new SparkContext(
    +      "local[10]",
    +      "continuous-stream-test-sql-context",
    +      sparkConf.set("spark.sql.testkey", "true")))
    +
    +  test("basic") {
    --- End diff --
    
    You are not testing all the cases of starting offsets, and other options. 
`KafkaSourceSuite` tests them, and since this is a whole different code path 
that microbatch, all of these case should be tested explicitly. 
    
    I think the KafkaSourceSuite can be refactored such that code can be 
reused. Its some amount of work but without it, we are not confident about 
testing the all the new code paths.
      
    Also the same with sink, there are combinations of options that are not 
tested (default topic specified/not-specified, null value in topic column)


---

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

Reply via email to