From ec0798ed5447eef9d4dbfa33e71e902b7d40397e Mon Sep 17 00:00:00 2001 From: Ramin Gharib Date: Tue, 25 Jun 2024 09:30:44 +0200 Subject: [PATCH] Update files --- .../main/java/com/bakdata/kafka/ImprovedStreamsConfig.java | 2 +- .../java/com/bakdata/kafka/ImprovedStreamsConfigTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/streams-bootstrap-core/src/main/java/com/bakdata/kafka/ImprovedStreamsConfig.java b/streams-bootstrap-core/src/main/java/com/bakdata/kafka/ImprovedStreamsConfig.java index 0e73b392..2d7cb8df 100644 --- a/streams-bootstrap-core/src/main/java/com/bakdata/kafka/ImprovedStreamsConfig.java +++ b/streams-bootstrap-core/src/main/java/com/bakdata/kafka/ImprovedStreamsConfig.java @@ -75,7 +75,7 @@ public Map getStreamsConfig() { * @return an {@code Optional} containing the {@link HostInfo} if the * {@link StreamsConfig#APPLICATION_SERVER_CONFIG} is set; otherwise, an empty {@code Optional}. */ - public Optional getHostInfo() { + public Optional getApplicationServer() { final String applicationServerConfig = this.streamsConfig.getString(APPLICATION_SERVER_CONFIG); return applicationServerConfig.isEmpty() ? Optional.empty() : Optional.of(createHostInfo(applicationServerConfig)); diff --git a/streams-bootstrap-core/src/test/java/com/bakdata/kafka/ImprovedStreamsConfigTest.java b/streams-bootstrap-core/src/test/java/com/bakdata/kafka/ImprovedStreamsConfigTest.java index 339b880f..bb17b0c2 100644 --- a/streams-bootstrap-core/src/test/java/com/bakdata/kafka/ImprovedStreamsConfigTest.java +++ b/streams-bootstrap-core/src/test/java/com/bakdata/kafka/ImprovedStreamsConfigTest.java @@ -81,7 +81,7 @@ void shouldHaveHostInfoIfApplicationServiceIsConfigure() { Map.of(StreamsConfig.APPLICATION_ID_CONFIG, "test-app", StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "broker1:9092", StreamsConfig.APPLICATION_SERVER_CONFIG, "localhost:9090")); - assertThat(new ImprovedStreamsConfig(config).getHostInfo()) + assertThat(new ImprovedStreamsConfig(config).getApplicationServer()) .hasValue(new HostInfo("localhost", 9090)); } @@ -90,7 +90,7 @@ void shouldReturnEmptyHostInfoIfApplicationServiceIsNotConfigure() { final StreamsConfig config = new StreamsConfig( Map.of(StreamsConfig.APPLICATION_ID_CONFIG, "test-app", StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092")); - assertThat(new ImprovedStreamsConfig(config).getHostInfo()) + assertThat(new ImprovedStreamsConfig(config).getApplicationServer()) .isEmpty(); }