diff --git a/consumer/src/test/kotlin/integrations/kafka/KafkaEventSinkNoTopicAutocreationIT.kt b/consumer/src/test/kotlin/integrations/kafka/KafkaEventSinkNoTopicAutocreationIT.kt index 7f6c7dab..be205ca1 100644 --- a/consumer/src/test/kotlin/integrations/kafka/KafkaEventSinkNoTopicAutocreationIT.kt +++ b/consumer/src/test/kotlin/integrations/kafka/KafkaEventSinkNoTopicAutocreationIT.kt @@ -68,7 +68,7 @@ class KafkaEventSinkNoTopicAutoCreationIT { fun `should consume only the registered topic`() { // given val topic = "shouldWriteCypherQuery" - val client = AdminClient.create(mapOf("bootstrap.servers" to "localhost:" + kafka.firstMappedPort)) + val client = AdminClient.create(mapOf("bootstrap.servers" to kafka.bootstrapServers)) val expectedTopics = listOf(topic) client.createTopics(expectedTopics.map { NewTopic(it, 1, 1) }) .all() diff --git a/producer/src/test/kotlin/streams/integrations/KafkaEventRouterNoTopicAutocreationIT.kt b/producer/src/test/kotlin/streams/integrations/KafkaEventRouterNoTopicAutocreationIT.kt index 5ee79e5e..ed6ef2ba 100644 --- a/producer/src/test/kotlin/streams/integrations/KafkaEventRouterNoTopicAutocreationIT.kt +++ b/producer/src/test/kotlin/streams/integrations/KafkaEventRouterNoTopicAutocreationIT.kt @@ -51,7 +51,7 @@ class KafkaEventRouterNoTopicAutocreationIT { Assume.assumeTrue("Kafka container has to exist", exists) Assume.assumeTrue("Kafka must be running", ::kafka.isInitialized && kafka.isRunning) - val client = AdminClient.create(mapOf("bootstrap.servers" to "localhost:" + kafka.firstMappedPort)) + val client = AdminClient.create(mapOf("bootstrap.servers" to kafka.bootstrapServers)) val topicsToCreate = listOf("person") client.createTopics(topicsToCreate.map { NewTopic(it, 1, 1) }) .all()