This is an automated email from the ASF dual-hosted git repository. rcordier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit c6cfeaefb412eaa9495a03b057030bcefa47c32f Author: Rene Cordier <[email protected]> AuthorDate: Thu Aug 10 09:14:29 2023 +0700 [FIX] Safer to test no delay with Requeue mailet with a little offset That test is unstable and breaks sometimes with a value of 1 seconds. Maybe our build is too heavy and there can be some little latency sometimes, we should relax a bit the testing constraint. --- .../src/test/java/org/apache/james/transport/mailets/RequeueTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/RequeueTest.java b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/RequeueTest.java index 28933420d6..92b6e158bf 100644 --- a/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/RequeueTest.java +++ b/server/mailet/mailets/src/test/java/org/apache/james/transport/mailets/RequeueTest.java @@ -20,6 +20,7 @@ package org.apache.james.transport.mailets; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.data.Offset.offset; import java.io.IOException; import java.time.Duration; @@ -179,7 +180,7 @@ class RequeueTest { .block(); assertThat(mailQueueItem).isNotNull(); - assertThat(Duration.between(enqueueTime, dequeueTime.get()).abs().toSeconds()).isZero(); + assertThat(Duration.between(enqueueTime, dequeueTime.get()).abs().toSeconds()).isCloseTo(0L, offset(1L)); } @Test --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
