Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/2483#discussion_r17955115
--- Diff:
external/kafka/src/test/scala/org/apache/spark/streaming/kafka/KafkaStreamSuite.scala
---
@@ -59,16 +58,35 @@ class KafkaStreamSuite extends TestSuiteBase {
override def beforeFunction() {
// Zookeeper server startup
- zookeeper = new EmbeddedZookeeper(zkConnect)
+ zookeeper = new EmbeddedZookeeper(s"$zkHost:$zkPort")
+ // Get the actual zookeeper binding port
+ zkPort = zookeeper.actualPort
logInfo("==================== 0 ====================")
- zkClient = new ZkClient(zkConnect, zkSessionTimeout,
zkConnectionTimeout, ZKStringSerializer)
+
+ zkClient = new ZkClient(s"$zkHost:$zkPort", zkSessionTimeout,
zkConnectionTimeout,
+ ZKStringSerializer)
logInfo("==================== 1 ====================")
// Kafka broker startup
- server = new KafkaServer(brokerConf)
- logInfo("==================== 2 ====================")
- server.startup()
- logInfo("==================== 3 ====================")
+ var bindSuccess: Boolean = false
+ while(!bindSuccess) {
+ try {
+ val brokerProps = getBrokerConfig(brokerPort, s"$zkHost:$zkPort")
+ brokerConf = new KafkaConfig(brokerProps)
+ server = new KafkaServer(brokerConf)
--- End diff --
alright. just one more round of testing, and will merge it if it passes.
---
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]