This is an automated email from the ASF dual-hosted git repository.
davsclaus 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 207df4efd5c Flaky test
207df4efd5c is described below
commit 207df4efd5cf9cc89925a9b7ecad8f13759bfc8f
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Jan 13 07:22:03 2025 +0100
Flaky test
---
.../java/org/apache/camel/impl/DurationRoutePolicyFactoryTest.java | 7 ++-----
.../RecipientListUseOriginalMessageEndpointExceptionIssueTest.java | 6 ++----
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git
a/core/camel-core/src/test/java/org/apache/camel/impl/DurationRoutePolicyFactoryTest.java
b/core/camel-core/src/test/java/org/apache/camel/impl/DurationRoutePolicyFactoryTest.java
index 781c783b3b3..cc44c190085 100644
---
a/core/camel-core/src/test/java/org/apache/camel/impl/DurationRoutePolicyFactoryTest.java
+++
b/core/camel-core/src/test/java/org/apache/camel/impl/DurationRoutePolicyFactoryTest.java
@@ -31,16 +31,13 @@ public class DurationRoutePolicyFactoryTest extends
ContextTestSupport {
@Test
public void testDurationRoutePolicyFactory() throws Exception {
-
assertTrue(context.getRouteController().getRouteStatus("foo").isStarted());
-
assertFalse(context.getRouteController().getRouteStatus("foo").isStopped());
-
// the policy should stop the route after 2 seconds which is approx
// 20-30 messages
getMockEndpoint("mock:foo").expectedMinimumMessageCount(10);
assertMockEndpointsSatisfied();
- // need a little time to stop async
- await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> {
+ // need some time to stop async
+ await().atMost(10, TimeUnit.SECONDS).untilAsserted(() -> {
assertFalse(context.getRouteController().getRouteStatus("foo").isStarted());
assertTrue(context.getRouteController().getRouteStatus("foo").isStopped());
});
diff --git
a/core/camel-core/src/test/java/org/apache/camel/issues/RecipientListUseOriginalMessageEndpointExceptionIssueTest.java
b/core/camel-core/src/test/java/org/apache/camel/issues/RecipientListUseOriginalMessageEndpointExceptionIssueTest.java
index 299b756f557..2d449c5703b 100644
---
a/core/camel-core/src/test/java/org/apache/camel/issues/RecipientListUseOriginalMessageEndpointExceptionIssueTest.java
+++
b/core/camel-core/src/test/java/org/apache/camel/issues/RecipientListUseOriginalMessageEndpointExceptionIssueTest.java
@@ -16,8 +16,6 @@
*/
package org.apache.camel.issues;
-import java.util.concurrent.TimeUnit;
-
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
@@ -44,7 +42,7 @@ public class
RecipientListUseOriginalMessageEndpointExceptionIssueTest extends C
template.sendBodyAndHeader(fileUri("inbox"), "A",
Exchange.FILE_NAME, "hello.txt");
- assertMockEndpointsSatisfied(100, TimeUnit.MILLISECONDS);
+ assertMockEndpointsSatisfied();
}
@Override
@@ -55,7 +53,7 @@ public class
RecipientListUseOriginalMessageEndpointExceptionIssueTest extends C
onException(Exception.class).handled(true).useOriginalMessage().to(fileUri("outbox"))
.to("mock:error");
- from(fileUri("inbox?initialDelay=0&delay=10"))
+ from(fileUri("inbox?initialDelay=100&delay=10"))
.transform(constant("B"))
.setHeader("path", constant("mock:throwException"))
// must enable share uow to let the onException use