Github user koeninger commented on a diff in the pull request:
https://github.com/apache/spark/pull/4537#discussion_r29342107
--- Diff:
external/kafka/src/test/scala/org/apache/spark/streaming/kafka/KafkaRDDSuite.scala
---
@@ -53,14 +53,16 @@ class KafkaRDDSuite extends FunSuite with
BeforeAndAfterAll {
}
test("basic usage") {
- val topic = "topicbasic"
+ val topic = s"topicbasic-${Random.nextInt}"
kafkaTestUtils.createTopic(topic)
val messages = Set("the", "quick", "brown", "fox")
kafkaTestUtils.sendMessages(topic, messages.toArray)
-
val kafkaParams = Map("metadata.broker.list" ->
kafkaTestUtils.brokerAddress,
- "group.id" -> s"test-consumer-${Random.nextInt(10000)}")
+ "group.id" -> s"test-consumer-${Random.nextInt}")
+
+ val kc = new KafkaCluster(kafkaParams)
+ kafkaTestUtils.waitUntilLeaderOffset(kc, topic, 0, messages.size)
--- End diff --
Those were just ruling out the possibility of jenkins failures being
related to stale duplicate topic or consumer state. There's nothing magical
about the number 10000 as a random range for the name, so I removed it.
---
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]