[jbosscache-commits] JBoss Cache SVN: r5662 - core/trunk/src/test/java/org/jboss/cache/buddyreplication.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Thu Apr 24 09:54:41 EDT 2008
Author: manik.surtani at jboss.com
Date: 2008-04-24 09:54:41 -0400 (Thu, 24 Apr 2008)
New Revision: 5662
Modified:
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithTransactionsTest.java
Log:
Added async cleanup delay
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithTransactionsTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithTransactionsTest.java 2008-04-24 12:20:44 UTC (rev 5661)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithTransactionsTest.java 2008-04-24 13:54:41 UTC (rev 5662)
@@ -7,6 +7,7 @@
package org.jboss.cache.buddyreplication;
import org.jboss.cache.Fqn;
+import org.jboss.cache.misc.TestingUtil;
import static org.testng.AssertJUnit.assertTrue;
import org.testng.annotations.Test;
@@ -49,6 +50,7 @@
txman.begin();
dumpCacheContents(caches);
+ // will cause gravitation
caches.get(2).get(fqn, key);
dumpCacheContents(caches);
@@ -63,6 +65,7 @@
assertTrue(!caches.get(2).exists(newBackupFqn));
txman.commit();
+ cleanupDelay(); // cleanup commands are async
dumpCacheContents(caches);
@@ -81,6 +84,11 @@
assertNoLocks(caches);
}
+ private void cleanupDelay()
+ {
+ TestingUtil.sleepThread(250);
+ }
+
public void testTransactionsRollback() throws Exception
{
caches = createCaches(3, false, true, false);
More information about the jbosscache-commits
mailing list