You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by lu...@apache.org on 2025/06/24 12:45:45 UTC

(kafka) branch trunk updated: KAFKA-19244: Fix flaky streams offsets reset integration test (#20027)

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 <10...@users.noreply.github.com>
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 <lb...@confluent.io>
---
 .../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");