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

    https://github.com/apache/spark/pull/4961#discussion_r26349727
  
    --- Diff: 
external/kafka/src/test/scala/org/apache/spark/streaming/kafka/KafkaClusterSuite.scala
 ---
    @@ -20,28 +20,36 @@ package org.apache.spark.streaming.kafka
     import scala.util.Random
     
     import kafka.common.TopicAndPartition
    -import org.scalatest.BeforeAndAfterAll
    +import org.scalatest.{FunSuite, BeforeAndAfterAll}
     
    -class KafkaClusterSuite extends KafkaStreamSuiteBase with 
BeforeAndAfterAll {
    -  val topic = "kcsuitetopic" + Random.nextInt(10000)
    -  val topicAndPartition = TopicAndPartition(topic, 0)
    -  var kc: KafkaCluster = null
    +class KafkaClusterSuite extends FunSuite with BeforeAndAfterAll {
    +  private val topic = "kcsuitetopic" + Random.nextInt(10000)
    +  private val topicAndPartition = TopicAndPartition(topic, 0)
    +  private var kc: KafkaCluster = null
    +
    +  private var kafkaTestUtils: KafkaTestUtils = _
     
       override def beforeAll() {
    -    setupKafka()
    -    createTopic(topic)
    -    sendMessages(topic, Map("a" -> 1))
    -    kc = new KafkaCluster(Map("metadata.broker.list" -> s"$brokerAddress"))
    +    kafkaTestUtils = new KafkaTestUtils
    +    kafkaTestUtils.setupEmbeddedZookeeper()
    +    kafkaTestUtils.setupEmbeddedKafkaServer()
    +
    +    kafkaTestUtils.createTopic(topic)
    +    kafkaTestUtils.sendMessages(topic, Map("a" -> 1))
    +    kc = new KafkaCluster(Map("metadata.broker.list" -> 
s"${kafkaTestUtils.brokerAddress}"))
    --- End diff --
    
    ` s"${kafkaTestUtils.brokerAddress}"` --> `kafkaTestUtils.brokerAddress`


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