chia7712 commented on code in PR #23417:
URL: https://github.com/apache/kafka/pull/23417#discussion_r4490850479
##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/InternalTopicManagerTest.java:
##########
@@ -313,57 +314,33 @@ public void
shouldThrowSetupTimeoutExceptionIfTopicExistsDuringSetup() {
}
@Test
- public void
shouldThrowTimeoutExceptionIfGetPartitionInfoHasTopicDescriptionTimeout() {
- mockAdminClient.timeoutNextRequest(1);
-
+ public void
shouldNotThrowExceptionIfGetPartitionInfoHasTopicDescriptionTimeout() {
final InternalTopicManager internalTopicManager =
new InternalTopicManager(time, mockAdminClient, new
StreamsConfig(config));
- try {
- final Set<String> topic1set = Set.of(topic1);
- internalTopicManager.getTopicPartitionInfo(topic1set, null);
-
- } catch (final TimeoutException expected) {
- assertEquals(TimeoutException.class,
expected.getCause().getClass());
- }
mockAdminClient.timeoutNextRequest(1);
+ final Set<String> topic1set = Set.of(topic1);
+ assertDoesNotThrow(
Review Comment:
Could we also verify the content of `tempUnknownTopics`? It should contain
`topic1`.
```java
@Test
public void
shouldAddTopicToTempUnknownIfGetPartitionInfoHasTopicDescriptionTimeout() {
mockAdminClient.timeoutNextRequest(1);
final Set<String> tempUnknownTopics = new HashSet<>();
assertEquals(Map.of(),
internalTopicManager.getTopicPartitionInfo(Set.of(topic1), tempUnknownTopics));
assertEquals(Set.of(topic1), tempUnknownTopics);
}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]