This is an automated email from the ASF dual-hosted git repository.
lucasbru pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new d61b162b13f KAFKA-19244: Fix flaky streams offsets reset integration
test (#20027)
d61b162b13f is described below
commit d61b162b13f14539f7434f85a7c45f4c7f5fa7c7
Author: Alieh Saeedi <[email protected]>
AuthorDate: Tue Jun 24 14:45:39 2025 +0200
KAFKA-19244: Fix flaky streams offsets reset integration test (#20027)
This PR deflakes the
`testResetOffsetsWithDeleteSpecifiedInternalTopics()`
Reviewers: Lucas Brutschy <[email protected]>
---
.../apache/kafka/tools/streams/ResetStreamsGroupOffsetTest.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git
a/tools/src/test/java/org/apache/kafka/tools/streams/ResetStreamsGroupOffsetTest.java
b/tools/src/test/java/org/apache/kafka/tools/streams/ResetStreamsGroupOffsetTest.java
index 7552e7fff11..8a843538632 100644
---
a/tools/src/test/java/org/apache/kafka/tools/streams/ResetStreamsGroupOffsetTest.java
+++
b/tools/src/test/java/org/apache/kafka/tools/streams/ResetStreamsGroupOffsetTest.java
@@ -459,13 +459,12 @@ public class ResetStreamsGroupOffsetTest {
// assert that the internal topics are deleted
if (specifiedInternalTopics.length > 0) {
- Set<String> internalTopicsAfterReset = getInternalTopics(appId);
-
TestUtils.waitForCondition(
- () -> internalTopicsAfterReset.size() ==
allInternalTopics.size(),
+ () -> getInternalTopics(appId).size() ==
allInternalTopics.size(),
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 -> {
assertFalse(internalTopicsAfterReset.contains(topic),
"Internal topic '" + topic + "' was not deleted as
expected after reset");