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 17b0f1d513ad CAMEL-27502: camel-hazelcast - the stop test of an 
exchange that cannot be created no longer fails at random (#30858)
17b0f1d513ad is described below

commit 17b0f1d513ad80be2289dc6a1daa349864dae2ae
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Nov 26 10:51:09 2026 +0100

    CAMEL-27502: camel-hazelcast - the stop test of an exchange that cannot be 
created no longer fails at random (#30858)
    
    exchangeThatCannotBeCreatedDoesNotHoldUpTheStop throws a simulated
    IllegalStateException on the consumer thread on purpose. Awaitility
    catches the uncaught exceptions of all threads while it waits, by default,
    and fails the test with them, so the test failed whenever the consumer
    threw while the await was still polling, and passed when it threw before.
    Seen on the CI build of #30824. The await no longer catches them.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 .../camel/component/hazelcast/HazelcastSedaTransactedStopTest.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaTransactedStopTest.java
 
b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaTransactedStopTest.java
index 72a98545ceb5..56e46faccbcc 100644
--- 
a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaTransactedStopTest.java
+++ 
b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaTransactedStopTest.java
@@ -161,7 +161,9 @@ class HazelcastSedaTransactedStopTest extends 
CamelTestSupport {
         context.getShutdownStrategy().setTimeout(6);
         failNextConsumerExchange.set(true);
         context.getRouteController().startRoute("sync");
-        await().atMost(10, TimeUnit.SECONDS).until(() -> 
!failNextConsumerExchange.get());
+        // the simulated failure is thrown on the consumer thread on purpose: 
Awaitility must not fail the test with it,
+        // which it does by default when another thread throws while it waits
+        await().dontCatchUncaughtExceptions().atMost(10, 
TimeUnit.SECONDS).until(() -> !failNextConsumerExchange.get());
 
         long start = System.nanoTime();
         context.getRouteController().stopRoute("sync");

Reply via email to