kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vvcep...@apache.org
Subject [kafka] 02/02: KAFKA-10514: Advance mock time for state directory cleanup (#9323)
Date Mon, 05 Oct 2020 20:15:19 GMT
This is an automated email from the ASF dual-hosted git repository.

vvcephei pushed a commit to branch 2.6
in repository https://gitbox.apache.org/repos/asf/kafka.git

commit 8d5c15aff6398e3a91a2070404267e4a2b0ab37c
Author: Bruno Cadonna <bruno@confluent.io>
AuthorDate: Wed Sep 23 17:02:32 2020 +0200

    KAFKA-10514: Advance mock time for state directory cleanup (#9323)
    
    The test did not update the MockTime, so the state directory cleaner couldn't run.
    
    Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, John Roesler <vvcephei@apache.org>
---
 .../org/apache/kafka/streams/processor/internals/StateDirectoryTest.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/streams/src/test/java/org/apache/kafka/streams/processor/internals/StateDirectoryTest.java
b/streams/src/test/java/org/apache/kafka/streams/processor/internals/StateDirectoryTest.java
index 5c109dc..cb98789 100644
--- a/streams/src/test/java/org/apache/kafka/streams/processor/internals/StateDirectoryTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/processor/internals/StateDirectoryTest.java
@@ -565,6 +565,7 @@ public class StateDirectoryTest {
 
         try (final LogCaptureAppender appender = LogCaptureAppender.createAndRegister(StateDirectory.class))
{
             final long cleanupDelayMs = 0;
+            time.sleep(5000);
             directory.cleanRemovedTasks(cleanupDelayMs);
             assertThat(appender.getMessages(), hasItem(endsWith("ms has elapsed (cleanup
delay is " +  cleanupDelayMs + "ms).")));
         }


Mime
View raw message