Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/4961#discussion_r26349936
--- Diff:
external/kafka/src/test/scala/org/apache/spark/streaming/kafka/ReliableKafkaStreamSuite.scala
---
@@ -29,32 +29,36 @@ import com.google.common.io.Files
import kafka.serializer.StringDecoder
import kafka.utils.{ZKGroupTopicDirs, ZkUtils}
import org.apache.commons.io.FileUtils
-import org.scalatest.BeforeAndAfter
+import org.scalatest.{FunSuite, BeforeAndAfter}
import org.scalatest.concurrent.Eventually
import org.apache.spark.SparkConf
import org.apache.spark.storage.StorageLevel
import org.apache.spark.streaming.{Milliseconds, StreamingContext}
-class ReliableKafkaStreamSuite extends KafkaStreamSuiteBase with
BeforeAndAfter with Eventually {
+class ReliableKafkaStreamSuite extends FunSuite with BeforeAndAfter with
Eventually {
- val sparkConf = new SparkConf()
+ private val sparkConf = new SparkConf()
.setMaster("local[4]")
.setAppName(this.getClass.getSimpleName)
.set("spark.streaming.receiver.writeAheadLog.enable", "true")
- val data = Map("a" -> 10, "b" -> 10, "c" -> 10)
+ private val data = Map("a" -> 10, "b" -> 10, "c" -> 10)
+ private var kafkaTestUtils: KafkaTestUtils = _
- var groupId: String = _
- var kafkaParams: Map[String, String] = _
- var ssc: StreamingContext = _
- var tempDirectory: File = null
+ private var groupId: String = _
+ private var kafkaParams: Map[String, String] = _
+ private var ssc: StreamingContext = _
+ private var tempDirectory: File = null
before {
--- End diff --
Can you make this testsuite create only one instance of kafkaTestUtils in
beforeAll instead of one per test?
---
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]