This is an automated email from the ASF dual-hosted git repository. chesnay pushed a commit to branch pull/19923/head in repository https://gitbox.apache.org/repos/asf/flink.git
commit 857be37b805ccad075423d83a04d61259238d9de Author: Chesnay Schepler <ches...@apache.org> AuthorDate: Wed Sep 14 18:00:43 2022 +0200 Fix inter-container connectivity --- .../flink-sql-client-test/src/test/java/SqlClientITCase.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flink-end-to-end-tests/flink-sql-client-test/src/test/java/SqlClientITCase.java b/flink-end-to-end-tests/flink-sql-client-test/src/test/java/SqlClientITCase.java index 212c54e8f2e..125d395e4ec 100644 --- a/flink-end-to-end-tests/flink-sql-client-test/src/test/java/SqlClientITCase.java +++ b/flink-end-to-end-tests/flink-sql-client-test/src/test/java/SqlClientITCase.java @@ -54,6 +54,8 @@ public class SqlClientITCase { private static final Logger LOG = LoggerFactory.getLogger(SqlClientITCase.class); + private static final String INTER_CONTAINER_KAFKA_ALIAS = "kafka"; + private static final Slf4jLogConsumer LOG_CONSUMER = new Slf4jLogConsumer(LOG); private static final Path sqlToolBoxJar = TestUtils.getResource(".*SqlToolbox.jar"); @@ -68,7 +70,7 @@ public class SqlClientITCase { public static final KafkaContainer KAFKA = new KafkaContainer(DockerImageName.parse(DockerImageVersions.KAFKA)) .withNetwork(NETWORK) - .withNetworkAliases("kafka") + .withNetworkAliases(INTER_CONTAINER_KAFKA_ALIAS) .withLogConsumer(LOG_CONSUMER); public final FlinkContainers flink = @@ -199,8 +201,8 @@ public class SqlClientITCase { " 'connector' = 'kafka',", " 'topic' = 'test-json',", " 'properties.bootstrap.servers' = '" - + KAFKA.getBootstrapServers() - + "',", + + INTER_CONTAINER_KAFKA_ALIAS + + ":9092',", " 'scan.startup.mode' = 'earliest-offset',", " 'format' = 'json',", " 'json.timestamp-format.standard' = 'ISO-8601'",