From f4f35fc2f59867cf231e61440eb8481d2d8afa30 Mon Sep 17 00:00:00 2001 From: Andy Taylor Date: Thu, 5 May 2016 13:00:53 +0100 Subject: [PATCH] fixing test create consumer before sending message so queue is auto created --- .../activemq/artemis/tests/extras/byteman/FailureXATest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/FailureXATest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/FailureXATest.java index b092e6691a..e279309454 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/FailureXATest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/FailureXATest.java @@ -93,17 +93,17 @@ public class FailureXATest extends ActiveMQTestBase { try { Session session = connection.createSession(true, Session.SESSION_TRANSACTED); Queue queue = session.createQueue("Queue1"); + final XASession xaSession = connection.createXASession(); + MessageConsumer consumer = xaSession.createConsumer(queue); MessageProducer producer = session.createProducer(queue); producer.send(session.createTextMessage("hello " + 1)); session.commit(); - final XASession xaSession = connection.createXASession(); XAResource xaResource = xaSession.getXAResource(); final Xid xid = newXID(); xaResource.start(xid, XAResource.TMNOFLAGS); - MessageConsumer consumer = xaSession.createConsumer(queue); connection.start(); Assert.assertNotNull(consumer.receive(5000));