mirror of https://github.com/apache/activemq.git
Fixing a race between the session being closed and the call to commit in the async handler that caused some exceptions occasionally in the test run.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1003908 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
227ed96df0
commit
5f490541f4
|
@ -116,12 +116,12 @@ public class JmsSchedulerTest extends EmbeddedBrokerTestSupport {
|
|||
final CountDownLatch latch = new CountDownLatch(COUNT);
|
||||
consumer.setMessageListener(new MessageListener() {
|
||||
public void onMessage(Message message) {
|
||||
latch.countDown();
|
||||
try {
|
||||
session.commit();
|
||||
} catch (JMSException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
latch.countDown();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue