ableegoldman commented on a change in pull request #10788: URL: https://github.com/apache/kafka/pull/10788#discussion_r679531569
########## File path: streams/src/test/java/org/apache/kafka/streams/processor/internals/NamedTopologyTest.java ########## @@ -112,15 +103,15 @@ public void shouldReturnTopologyByName() { final NamedTopology topology2 = builder2.buildNamedTopology(props); final NamedTopology topology3 = builder3.buildNamedTopology(props); streams = new KafkaStreamsNamedTopologyWrapper(asList(topology1, topology2, topology3), props, clientSupplier); - assertThat(streams.getTopologyByName("topology-1"), equalTo(topology1)); - assertThat(streams.getTopologyByName("topology-2"), equalTo(topology2)); - assertThat(streams.getTopologyByName("topology-3"), equalTo(topology3)); + assertThat(streams.getTopologyByName("topology-1").get(), equalTo(topology1)); + assertThat(streams.getTopologyByName("topology-2").get(), equalTo(topology2)); + assertThat(streams.getTopologyByName("topology-3").get(), equalTo(topology3)); } @Test - public void shouldThrowIllegalArgumentWhenLookingUpNonExistentTopologyByName() { + public void shouldReturnEmptyWhenLookingUpNonExistentTopologyByName() { Review comment: We changed the behavior to return an empty Optional rather than throw, as users may want to use this API to determine whether the given named topology is known or not -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org