From 646d0234d7cc4eb655b33dffee0e8faff0055417 Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Wed, 29 May 2013 20:43:11 +0000 Subject: [PATCH] Fix test case, an additional log file is retained now that we are more careful about tracking acks that are needed for recovery from the journal. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1487636 13f79535-47bb-0310-9956-ffa450edef68 --- .../usecases/DurableSubscriptionOfflineTest.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java index 385e1c4441..9a92b60f82 100644 --- a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java +++ b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java @@ -1505,8 +1505,15 @@ public class DurableSubscriptionOfflineTest extends org.apache.activemq.TestSupp destroyBroker(); createBroker(false); - KahaDBPersistenceAdapter pa = (KahaDBPersistenceAdapter) broker.getPersistenceAdapter(); - assertEquals("only two journal file(s) left after restart", 2, pa.getStore().getJournal().getFileMap().size()); + final KahaDBPersistenceAdapter pa = (KahaDBPersistenceAdapter) broker.getPersistenceAdapter(); + assertTrue("Should have three journal files left but was: " + + pa.getStore().getJournal().getFileMap().size(), Wait.waitFor(new Wait.Condition() { + + @Override + public boolean isSatisified() throws Exception { + return pa.getStore().getJournal().getFileMap().size() == 3; + } + })); } // https://issues.apache.org/jira/browse/AMQ-3768