This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 4092b23 Fixed tests as Camel routing engine has been fully non-blocking and asynchronous with the expense that transactions cannot be propagated/guaranteed across all EIPs. 4092b23 is described below commit 4092b23ed5bb15f403e5674a4eccac4bdf5b12c6 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Sun May 26 18:49:29 2019 +0200 Fixed tests as Camel routing engine has been fully non-blocking and asynchronous with the expense that transactions cannot be propagated/guaranteed across all EIPs. --- .../camel/component/jms/tx/AsyncEndpointJmsTXMulticastTest.java | 8 ++++---- .../component/jms/tx/AsyncEndpointJmsTXRecipientListTest.java | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AsyncEndpointJmsTXMulticastTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AsyncEndpointJmsTXMulticastTest.java index b72c796..a267032 100644 --- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AsyncEndpointJmsTXMulticastTest.java +++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AsyncEndpointJmsTXMulticastTest.java @@ -44,8 +44,8 @@ public class AsyncEndpointJmsTXMulticastTest extends CamelSpringTestSupport { assertMockEndpointsSatisfied(); - // we are synchronous due to TX so the we are using same threads during the routing - assertTrue("Should use same threads", beforeThreadName.equalsIgnoreCase(afterThreadName)); + // we are asynchronous due to multicast so that we are NOT using same threads during the routing + assertFalse("Should not use same threads", beforeThreadName.equalsIgnoreCase(afterThreadName)); } @Override @@ -65,15 +65,15 @@ public class AsyncEndpointJmsTXMulticastTest extends CamelSpringTestSupport { assertTrue("Exchange should be transacted", exchange.isTransacted()); } }) + // if we use mutlicast then we cannot propagate transactions across .multicast().to("direct:foo"); from("direct:foo") - // tx should be conveyed to this route as well .to("async:bye:camel") .process(new Processor() { public void process(Exchange exchange) throws Exception { afterThreadName = Thread.currentThread().getName(); - assertTrue("Exchange should be transacted", exchange.isTransacted()); + assertFalse("Exchange should NO longer be transacted", exchange.isTransacted()); } }) .to("log:after") diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AsyncEndpointJmsTXRecipientListTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AsyncEndpointJmsTXRecipientListTest.java index 0e8fc6b..dd7778f 100644 --- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AsyncEndpointJmsTXRecipientListTest.java +++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/AsyncEndpointJmsTXRecipientListTest.java @@ -44,8 +44,8 @@ public class AsyncEndpointJmsTXRecipientListTest extends CamelSpringTestSupport assertMockEndpointsSatisfied(); - // we are synchronous due to TX so the we are using same threads during the routing - assertTrue("Should use same threads", beforeThreadName.equalsIgnoreCase(afterThreadName)); + // we are asynchronous due to recipientlist so that we are NOT using same threads during the routing + assertFalse("Should not use same threads", beforeThreadName.equalsIgnoreCase(afterThreadName)); } @Override @@ -68,12 +68,11 @@ public class AsyncEndpointJmsTXRecipientListTest extends CamelSpringTestSupport .recipientList(constant("direct:foo")); from("direct:foo") - // tx should be conveyed to this route as well .to("async:bye:camel") .process(new Processor() { public void process(Exchange exchange) throws Exception { afterThreadName = Thread.currentThread().getName(); - assertTrue("Exchange should be transacted", exchange.isTransacted()); + assertFalse("Exchange should NO longer be transacted", exchange.isTransacted()); } }) .to("log:after")