Skip to content

Commit ce479b1

Browse files
authored
test(integration-tests): fix TopicTracingIT flaky test (kroxylicious#3859)
Add wait for topicB metadata propagation before deletion to prevent UnknownTopicIdException. The test was creating topicB with the 'setup' admin client then immediately deleting it with a different 'admin' client without waiting for metadata to propagate between clients. Fixes kroxylicious#3858 Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Keith Wall <kwall@apache.org>
1 parent dcf6573 commit ce479b1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • kroxylicious-integration-tests/src/test/java/io/kroxylicious/it/filter/authorization

kroxylicious-integration-tests/src/test/java/io/kroxylicious/it/filter/authorization/TopicTracingIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ public void run(ClientFactory clientFactory) {
155155
admin.describeConfigs(ConfigResource.Type.TOPIC, topicA);
156156
admin.alterConfigs(ConfigResource.Type.TOPIC, topicA, new ConfigEntry(TopicConfig.COMPRESSION_TYPE_CONFIG, "zstd"));
157157
var topicBId = setup.createTopic(topicB).value();
158+
Awaitility.waitAtMost(10, TimeUnit.SECONDS).until(() -> ClusterPrepUtils.allTopicPartitionsHaveALeader(setup.admin(), List.of(TOPIC_B)));
158159

159160
admin.deleteTopic(topicBId);
160161
}

0 commit comments

Comments
 (0)