activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1487636 - /activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java
Date Wed, 29 May 2013 20:43:12 GMT
Author: tabish
Date: Wed May 29 20:43:11 2013
New Revision: 1487636

URL: http://svn.apache.org/r1487636
Log:
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.

Modified:
    activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java

Modified: activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java?rev=1487636&r1=1487635&r2=1487636&view=diff
==============================================================================
--- activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java
(original)
+++ activemq/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionOfflineTest.java
Wed May 29 20:43:11 2013
@@ -1505,8 +1505,15 @@ public class DurableSubscriptionOfflineT
 
         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



Mime
View raw message