Author: clebert.suconic(a)jboss.com
Date: 2011-11-29 22:20:21 -0500 (Tue, 29 Nov 2011)
New Revision: 11792
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/JMSPagingFileDeleteTest.java
Log:
fixing a test (deletion of pages is asynchronous)
Modified:
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/JMSPagingFileDeleteTest.java
===================================================================
---
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/JMSPagingFileDeleteTest.java 2011-11-30
02:45:28 UTC (rev 11791)
+++
branches/Branch_2_2_EAP/tests/src/org/hornetq/tests/integration/client/JMSPagingFileDeleteTest.java 2011-11-30
03:20:21 UTC (rev 11792)
@@ -149,6 +149,13 @@
producer.send(bytesMessage);
printPageStoreInfo(pagingStore);
+
+ timeout = System.currentTimeMillis() + 10000;
+
+ while (timeout > System.currentTimeMillis() &&
pagingStore.getNumberOfPages() != 1)
+ {
+ Thread.sleep(100);
+ }
assertEquals(1, pagingStore.getNumberOfPages()); //I expected number of the page
is 1, but It was not.
}