Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.common.config.ConfigResource;
import org.apache.kafka.common.errors.TimeoutException;
import org.apache.kafka.common.errors.UnknownServerException;
import org.apache.kafka.common.errors.UnknownTopicOrPartitionException;
import org.apache.kafka.common.protocol.ApiKeys;
import org.apache.kafka.common.protocol.Errors;
Expand Down Expand Up @@ -355,8 +356,9 @@ public void testCreateInvalidTopics() {
createTopicsByKafkaAdmin(kafkaAdmin, topicToNumPartitions);
fail("create a invalid topic should fail");
} catch (Exception e) {
log.info("Failed to create topics: {}", topicToNumPartitions);
assertTrue(e.getCause() instanceof TimeoutException);
log.info("Failed to create topics: {} caused by {}", topicToNumPartitions, e.getCause());
final Throwable cause = e.getCause();
assertTrue(cause instanceof TimeoutException || cause instanceof UnknownServerException);
}
}

Expand Down