From fe11fb4c02e3fc0492191224b366df878329e809 Mon Sep 17 00:00:00 2001 From: jbertram Date: Fri, 30 Jan 2015 13:35:16 -0600 Subject: [PATCH] avoid potential NPE --- .../integration/cluster/distribution/ClusterTestBase.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusterTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusterTestBase.java index 9c4d1185e8..7370f33c67 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusterTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/cluster/distribution/ClusterTestBase.java @@ -1201,16 +1201,16 @@ public abstract class ClusterTestBase extends ServiceTestBase ClientMessage message = holder.consumer.receive(WAIT_TIMEOUT); - message.acknowledge(); - - consumers[consumerIDs[count]].session.commit(); - Assert.assertNotNull("consumer " + consumerIDs[count] + " did not receive message " + i, message); Assert.assertEquals("consumer " + consumerIDs[count] + " message " + i, i, message.getObjectProperty(ClusterTestBase.COUNT_PROP)); + message.acknowledge(); + + consumers[consumerIDs[count]].session.commit(); + } count++;