ARTEMIS-475 - [Artemis Testsuite] SessionCloseTest#testCanNotUseXAWithClosedSession fails

This commit is contained in:
Erich Duda 2016-04-08 08:25:44 +02:00 committed by Clebert Suconic
parent 6bbceff7c0
commit 9055c76cc8
1 changed files with 8 additions and 1 deletions

View File

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