From 42cc2adb53cab7f6586c312829edd3173224ae6c Mon Sep 17 00:00:00 2001 From: Gunnar von der Beck Date: Wed, 22 Nov 2023 17:35:44 +0100 Subject: [PATCH] tests: different setup for ExporterMinTimeToLiveTest --- .../java/io/zeebe/redis/ExporterMinTimeToLiveTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exporter/src/test/java/io/zeebe/redis/ExporterMinTimeToLiveTest.java b/exporter/src/test/java/io/zeebe/redis/ExporterMinTimeToLiveTest.java index 013337b..39f7d3a 100644 --- a/exporter/src/test/java/io/zeebe/redis/ExporterMinTimeToLiveTest.java +++ b/exporter/src/test/java/io/zeebe/redis/ExporterMinTimeToLiveTest.java @@ -34,7 +34,7 @@ public class ExporterMinTimeToLiveTest { @Container public ZeebeTestContainer zeebeContainer = ZeebeTestContainer - .withCleanupCycleInSeconds(2).doDeleteAfterAcknowledge(true).withMinTTLInSeconds(5); + .withCleanupCycleInSeconds(3).doDeleteAfterAcknowledge(true).withMinTTLInSeconds(10); private RedisClient redisClient; private StatefulRedisConnection redisConnection; @@ -72,14 +72,14 @@ public void shouldConsiderMinTtlWhenDeleteAfterAcknowledge() throws Exception { }; // when: cleanupHasRun but min TTL has not been reached - Thread.sleep(3000); + Thread.sleep(6000); // then: cleanup did not yet remove the messages assertThat(redisConnection.sync().xlen("zeebe:DEPLOYMENT")).isEqualTo(xlen); // but will delete them after min TTL - var delay = Duration.ofSeconds(3); - await().atMost(Duration.ofSeconds(5)).pollDelay(delay).pollInterval(Duration.ofMillis(500)).pollInSameThread() + var delay = Duration.ofSeconds(5); + await().atMost(Duration.ofSeconds(6)).pollDelay(delay).pollInterval(Duration.ofMillis(1000)).pollInSameThread() .untilAsserted(() -> assertThat(redisConnection.sync().xlen("zeebe:DEPLOYMENT")).isLessThan(xlen)); }