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); } });