KAFKA-9545: Fix Flaky Test `RegexSourceIntegrationTest.testRegexMatchesTopicsAWhenDeleted` (#14910)

RegexSourceIntegrationTest.testRegexMatchesTopicsAWhenDeleted does not wait to ensure that test-topic-A is deleted. The second assignment condition times out in 15sec.

We should wait for the topic to be deleted (default timeout = 30sec) and then check the assignment.

Reviewers: Walker Carlson <wcarlson@apache.org>
This commit is contained in:
ashwinpankaj 2023-12-05 22:46:06 +05:30 committed by GitHub
parent 587f50d48f
commit f2aeff0026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -289,7 +289,7 @@ public class RegexSourceIntegrationTest {
streams.start(); streams.start();
TestUtils.waitForCondition(() -> assignedTopics.equals(expectedFirstAssignment), STREAM_TASKS_NOT_UPDATED); TestUtils.waitForCondition(() -> assignedTopics.equals(expectedFirstAssignment), STREAM_TASKS_NOT_UPDATED);
} finally { } finally {
CLUSTER.deleteTopic("TEST-TOPIC-A"); CLUSTER.deleteTopicAndWait("TEST-TOPIC-A");
} }
TestUtils.waitForCondition(() -> assignedTopics.equals(expectedSecondAssignment), STREAM_TASKS_NOT_UPDATED); TestUtils.waitForCondition(() -> assignedTopics.equals(expectedSecondAssignment), STREAM_TASKS_NOT_UPDATED);