From 38493e3d17d4c53f0c7b7863e0ca230025f844da Mon Sep 17 00:00:00 2001 From: Francesco Nigro Date: Wed, 27 Mar 2019 09:46:25 +0100 Subject: [PATCH] ARTEMIS-2264 Added test that receive all messages instead of remove --- .../cluster/failover/BackupSyncJournalTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncJournalTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncJournalTest.java index f1d23bebf3..aae8427802 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncJournalTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/BackupSyncJournalTest.java @@ -338,6 +338,16 @@ public class BackupSyncJournalTest extends FailoverTestBase { assertNoMoreMessages(); } + @Test + public void testReceiveAllMessagesWithPurgeOnNoConsumers() throws Exception { + final boolean purgeOnNoConsumers = true; + createProducerSendSomeMessages(); + liveServer.getServer().locateQueue(ADDRESS).setPurgeOnNoConsumers(purgeOnNoConsumers); + receiveMsgsInRange(0, n_msgs); + startBackupCrashLive(); + assertNoMoreMessages(); + } + private void startBackupCrashLive() throws Exception { assertFalse("backup is started?", backupServer.isStarted()); liveServer.removeInterceptor(syncDelay);