This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new 073e2a9bba4 (chores) camel-core: be a bit more lenient to avoid false negatives in file tests 073e2a9bba4 is described below commit 073e2a9bba49d8180fa522b4de1124d0ef246970 Author: Otavio Rodolfo Piske <angusyo...@gmail.com> AuthorDate: Tue Jan 24 18:33:58 2023 +0100 (chores) camel-core: be a bit more lenient to avoid false negatives in file tests --- .../component/file/FileConsumerPollStrategyStopOnRollbackTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyStopOnRollbackTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyStopOnRollbackTest.java index d9786dcaab8..472cd02226b 100644 --- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyStopOnRollbackTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyStopOnRollbackTest.java @@ -16,6 +16,8 @@ */ package org.apache.camel.component.file; +import java.time.Duration; + import org.apache.camel.Consumer; import org.apache.camel.ContextTestSupport; import org.apache.camel.Endpoint; @@ -25,6 +27,7 @@ import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.spi.PollingConsumerPollStrategy; import org.apache.camel.spi.Registry; +import org.awaitility.Awaitility; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.DisabledIfSystemProperty; @@ -67,7 +70,7 @@ public class FileConsumerPollStrategyStopOnRollbackTest extends ContextTestSuppo // never get a message mock.assertIsSatisfied(50); - assertEquals("rollback", event); + Awaitility.await().atMost(Duration.ofSeconds(5)).untilAsserted(() -> assertEquals("rollback", event)); } private static class MyPollStrategy implements PollingConsumerPollStrategy {