From 9055c76cc88320d94a6c4341b9b29b68e2e0cd7a Mon Sep 17 00:00:00 2001 From: Erich Duda Date: Fri, 8 Apr 2016 08:25:44 +0200 Subject: [PATCH] ARTEMIS-475 - [Artemis Testsuite] SessionCloseTest#testCanNotUseXAWithClosedSession fails --- .../tests/integration/client/SessionCloseTest.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java index 2d30112ee3..559cc0ab63 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java @@ -144,10 +144,17 @@ public class SessionCloseTest extends ActiveMQTestBase { Assert.assertTrue(session.isXA()); Assert.assertTrue(session.isClosed()); + ActiveMQTestBase.expectXAException(XAException.XAER_RMFAIL, new ActiveMQAction() { + @Override + public void run() throws XAException { + session.commit(randomXid(), true); + } + }); + ActiveMQTestBase.expectXAException(XAException.XA_RETRY, new ActiveMQAction() { @Override public void run() throws XAException { - session.commit(randomXid(), RandomUtil.randomBoolean()); + session.commit(randomXid(), false); } });