You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by rh...@apache.org on 2019/10/02 16:14:33 UTC
[kafka] branch 2.2 updated: Minor: fix a few flaky test failures
This is an automated email from the ASF dual-hosted git repository.
rhauch pushed a commit to branch 2.2
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/2.2 by this push:
new 529434d Minor: fix a few flaky test failures
529434d is described below
commit 529434dfd51f5f1a1e3aa2b3cc824deb910cb840
Author: David Arthur <mu...@gmail.com>
AuthorDate: Wed Oct 2 10:29:25 2019 -0400
Minor: fix a few flaky test failures
---
.../test/scala/unit/kafka/controller/ControllerIntegrationTest.scala | 2 +-
core/src/test/scala/unit/kafka/network/SocketServerTest.scala | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/core/src/test/scala/unit/kafka/controller/ControllerIntegrationTest.scala b/core/src/test/scala/unit/kafka/controller/ControllerIntegrationTest.scala
index 08747a8..9473118 100644
--- a/core/src/test/scala/unit/kafka/controller/ControllerIntegrationTest.scala
+++ b/core/src/test/scala/unit/kafka/controller/ControllerIntegrationTest.scala
@@ -87,7 +87,7 @@ class ControllerIntegrationTest extends ZooKeeperTestHarness {
@Test
def testMetadataPropagationOnControlPlane(): Unit = {
- servers = makeServers(1, listeners = Some("PLAINTEXT://localhost:0,CONTROLLER://localhost:5000"), listenerSecurityProtocolMap = Some("PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT"),
+ servers = makeServers(1, listeners = Some("PLAINTEXT://localhost:0,CONTROLLER://localhost:0"), listenerSecurityProtocolMap = Some("PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT"),
controlPlaneListenerName = Some("CONTROLLER"))
TestUtils.waitUntilBrokerMetadataIsPropagated(servers)
val controlPlaneMetricMap = mutable.Map[String, KafkaMetric]()
diff --git a/core/src/test/scala/unit/kafka/network/SocketServerTest.scala b/core/src/test/scala/unit/kafka/network/SocketServerTest.scala
index 81a96a3..9ccb3f5 100644
--- a/core/src/test/scala/unit/kafka/network/SocketServerTest.scala
+++ b/core/src/test/scala/unit/kafka/network/SocketServerTest.scala
@@ -192,12 +192,13 @@ class SocketServerTest extends JUnitSuite {
def testControlPlaneRequest(): Unit = {
val testProps = new Properties
testProps ++= props
- testProps.put("listeners", "PLAINTEXT://localhost:0,CONTROLLER://localhost:5000")
+ testProps.put("listeners", "PLAINTEXT://localhost:0,CONTROLLER://localhost:0")
testProps.put("listener.security.protocol.map", "PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT")
testProps.put("control.plane.listener.name", "CONTROLLER")
val config = KafkaConfig.fromProps(testProps)
withTestableServer(config, { testableServer =>
- val socket = connect(testableServer, config.controlPlaneListenerName.get, localAddr = InetAddress.getLocalHost, port = 5000)
+ val socket = connect(testableServer, config.controlPlaneListenerName.get,
+ localAddr = InetAddress.getLocalHost)
sendAndReceiveControllerRequest(socket, testableServer)
})
}