Skip to content

Commit

Permalink
Update files
Browse files Browse the repository at this point in the history
  • Loading branch information
raminqaf committed Jun 25, 2024
1 parent 95dead8 commit ec0798e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public Map<String, Object> 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<HostInfo> getHostInfo() {
public Optional<HostInfo> getApplicationServer() {
final String applicationServerConfig = this.streamsConfig.getString(APPLICATION_SERVER_CONFIG);
return applicationServerConfig.isEmpty() ? Optional.empty()
: Optional.of(createHostInfo(applicationServerConfig));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand All @@ -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();
}

Expand Down

0 comments on commit ec0798e

Please sign in to comment.