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++; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/DuplicateCacheTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/DuplicateCacheTest.java index 578f623cb5..29dfab5c4e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/DuplicateCacheTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/persistence/DuplicateCacheTest.java @@ -71,9 +71,6 @@ public class DuplicateCacheTest extends StorageManagerTestBase cache.deleteFromCache(id); assertFalse(cache.contains(id)); - - cache.deleteFromCache(id); - }