removing System.exit from test

This commit is contained in:
Clebert Suconic 2016-08-26 15:11:48 -04:00
parent 3668050c8c
commit 6a1a1b085f
1 changed files with 15 additions and 22 deletions

View File

@ -180,29 +180,22 @@ public class PagingTest extends ActiveMQTestBase {
Assert.assertNotNull(message2); Assert.assertNotNull(message2);
} }
try { if (ad > -1) {
if (ad > -1) { session.commit();
session.commit();
}
else {
session.rollback();
for (int i = 0; i < 100; i++) {
ClientMessage message2 = consumer.receive(LargeMessageTest.RECEIVE_WAIT_TIME);
Assert.assertNotNull(message2);
message2.acknowledge();
Assert.assertNotNull(message2);
}
session.commit();
}
} }
catch (Throwable e) { else {
System.err.println("here!!!!!!!"); session.rollback();
e.printStackTrace(); for (int i = 0; i < 100; i++) {
System.exit(-1); ClientMessage message2 = consumer.receive(LargeMessageTest.RECEIVE_WAIT_TIME);
Assert.assertNotNull(message2);
message2.acknowledge();
Assert.assertNotNull(message2);
}
session.commit();
} }
consumer.close(); consumer.close();