resolve intermittent failure with this test, fix up the sync

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1153849 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2011-08-04 11:26:03 +00:00
parent 84a16161be
commit 8ec1347e30
1 changed files with 7 additions and 8 deletions

View File

@ -163,16 +163,15 @@ public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport {
// let the session deliver the message
session.run();
// commit the tx
try {
session.commit();
}
catch (JMSException e) {
}
// commit the tx and
// return ServerSession to pool
synchronized (pool) {
pool.serverSessionInUse = false;
try {
session.commit();
}
catch (JMSException e) {
}
pool.serverSessionInUse = false;
}
// let the test check if the test was completed