Skip to content

Commit 490d55d

Browse files
committed
fix broken tests
1 parent 7635edb commit 490d55d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

floodplain-integration/src/test/kotlin/io.floodplain.integration/TestTopicCreation.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
package io.floodplain.integration
2020

21+
import io.floodplain.test.InstantiatedRedPandaContainer
2122
import org.apache.kafka.clients.admin.AdminClient
2223
import org.apache.kafka.clients.admin.ListTopicsOptions
2324
import org.apache.kafka.clients.admin.NewTopic
@@ -35,7 +36,7 @@ class TestTopicCreation {
3536
// .withEnv(env)
3637

3738
// Infra for testing Kafka interaction
38-
// private val panda = InstantiatedRedPandaContainer()
39+
private val panda = InstantiatedRedPandaContainer()
3940
// val kafkaContainer = KafkaContainer("5.5.3").withEmbeddedZookeeper().withExposedPorts(9092,9093)
4041

4142
// Not functional yet
@@ -45,8 +46,8 @@ class TestTopicCreation {
4546
// kafkaContainer.start()
4647
// logger.info("Bootsx§trap: ${kafkaContainer.bootstrapServers}")
4748
val config: MutableMap<String, Any> = HashMap()
48-
// val exposedPort = panda.exposedPort
49-
val host = "localhost:9093"
49+
val exposedPort = panda.exposedPort
50+
val host = "localhost:${exposedPort}"
5051
logger.info("Exposed host: $host")
5152
config["bootstrap.servers"] = host // "localhost:51347"
5253
config["client.id"] = UUID.randomUUID().toString()

floodplain-test/src/main/kotlin/io/floodplain/test/InstantiatedContainer.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class RedpandaContainer : GenericContainer<RedpandaContainer?>("vectorized/redpa
113113
command += "/usr/bin/rpk redpanda start --check=false --node-id 0 "
114114
command += "--kafka-addr PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092 "
115115
command += "--advertise-kafka-addr PLAINTEXT://broker:29092,OUTSIDE://$host:" + getMappedPort(
116-
29092
116+
9092
117117
)
118118
logger.info("command: $command")
119119
logger.info("mapped port: $host:${getMappedPort(9092)}")

0 commit comments

Comments
 (0)