You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ch...@apache.org on 2026/09/30 05:02:57 UTC

(kafka) branch trunk updated: MINOR: fix record time in test shouldSurviveWithOneTaskAsStandby (#23606)

This is an automated email from the ASF dual-hosted git repository.

chia7712 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 21d70afdaa9 MINOR: fix record time in test shouldSurviveWithOneTaskAsStandby (#23606)
21d70afdaa9 is described below

commit 21d70afdaa9be22e9d6335c01071a5fdf2c3a3dc
Author: Russole Chen <54...@users.noreply.github.com>
AuthorDate: Wed Sep 30 13:02:47 2026 +0800

    MINOR: fix record time in test shouldSurviveWithOneTaskAsStandby (#23606)
    
    Fix flaky `shouldSurviveWithOneTaskAsStandby` by using the current time
    for the input record timestamp.
    
    Reviewers: Chia-Ping Tsai <ch...@gmail.com>
---
 .../kafka/streams/integration/StandbyTaskEOSIntegrationTest.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/StandbyTaskEOSIntegrationTest.java b/streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/StandbyTaskEOSIntegrationTest.java
index 9b4c4f9b8e8..497cfdcd7cd 100644
--- a/streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/StandbyTaskEOSIntegrationTest.java
+++ b/streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/StandbyTaskEOSIntegrationTest.java
@@ -128,6 +128,8 @@ public class StandbyTaskEOSIntegrationTest {
     @ParameterizedTest
     @ValueSource(booleans = {false, true})
     public void shouldSurviveWithOneTaskAsStandby(final boolean transactionalStateStores) throws Exception {
+        final long time = System.currentTimeMillis();
+
         IntegrationTestUtils.produceKeyValuesSynchronouslyWithTimestamp(
             inputTopic,
             Collections.singletonList(
@@ -139,7 +141,7 @@ public class StandbyTaskEOSIntegrationTest {
                 IntegerSerializer.class,
                 new Properties()
             ),
-            10L
+            10L + time
         );
 
         final String stateDirPath = TestUtils.tempDirectory(appId).getPath();