KAFKA-19244: Fix flaky streams offsets reset integration test (#20027)
CI / build (push) Waiting to run Details

This PR deflakes the
`testResetOffsetsWithDeleteSpecifiedInternalTopics()`

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
This commit is contained in:
Alieh Saeedi 2025-06-24 14:45:39 +02:00 committed by GitHub
parent 1ca8779bee
commit d61b162b13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -459,13 +459,12 @@ public class ResetStreamsGroupOffsetTest {
// assert that the internal topics are deleted // assert that the internal topics are deleted
if (specifiedInternalTopics.length > 0) { if (specifiedInternalTopics.length > 0) {
Set<String> internalTopicsAfterReset = getInternalTopics(appId);
TestUtils.waitForCondition( TestUtils.waitForCondition(
() -> internalTopicsAfterReset.size() == allInternalTopics.size(), () -> getInternalTopics(appId).size() == allInternalTopics.size(),
30_000, "Internal topics were not deleted as expected after reset" 30_000, "Internal topics were not deleted as expected after reset"
); );
// verify that the specified internal topics were deleted
Set<String> internalTopicsAfterReset = getInternalTopics(appId);
specifiedInternalTopicsList.forEach(topic -> { specifiedInternalTopicsList.forEach(topic -> {
assertFalse(internalTopicsAfterReset.contains(topic), assertFalse(internalTopicsAfterReset.contains(topic),
"Internal topic '" + topic + "' was not deleted as expected after reset"); "Internal topic '" + topic + "' was not deleted as expected after reset");