activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r745490 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java
Date Wed, 18 Feb 2009 12:15:58 GMT
Author: gtully
Date: Wed Feb 18 12:15:58 2009
New Revision: 745490

URL: http://svn.apache.org/viewvc?rev=745490&view=rev
Log:
re AMQ-2076, see if a little more time will help

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java?rev=745490&r1=745489&r2=745490&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java
Wed Feb 18 12:15:58 2009
@@ -94,20 +94,21 @@
         }
         latch.await();
         assertEquals(max_messages, messageCounter);
-        waitFordataFilesToBeCleanedUp(persistentAdapter.getAsyncDataManager(), 30000, 2);

+        LOG.info("Sent and received + " + messageCounter + ", file count " + persistentAdapter.getAsyncDataManager().getFiles().size());
+        waitFordataFilesToBeCleanedUp(persistentAdapter.getAsyncDataManager(), 60000, 2);

     }
 
     private void waitFordataFilesToBeCleanedUp(
             AsyncDataManager asyncDataManager, int timeout, int numExpected) throws InterruptedException
{
         long expiry = System.currentTimeMillis()  + timeout;
         while(expiry > System.currentTimeMillis()) {
-            if (asyncDataManager.getFiles().size() <= numExpected) {
-                break;
-            } else {
+            if (asyncDataManager.getFiles().size() > numExpected) {
                 Thread.sleep(1000);
+            } else {
+                break;
             }
         }
-        assertEquals("persistence adapter dataManager has correct number of files", 2, asyncDataManager.getFiles().size());
+        assertEquals("persistence adapter dataManager has correct number of files", numExpected,
asyncDataManager.getFiles().size());
     }
 
     private Connection createConnection() throws JMSException {



Mime
View raw message