ARTEMIS-2264 Added test that receive all messages instead of remove

This commit is contained in:
Francesco Nigro 2019-03-27 09:46:25 +01:00 committed by Michael Andre Pearce
parent 6bc2d2e741
commit 38493e3d17
1 changed files with 10 additions and 0 deletions

View File

@ -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);