[jbosscache-commits] JBoss Cache SVN: r6669 - core/trunk/src/test/java/org/jboss/cache/optimistic.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Tue Sep 2 05:50:44 EDT 2008


Author: mircea.markus
Date: 2008-09-02 05:50:44 -0400 (Tue, 02 Sep 2008)
New Revision: 6669

Modified:
   core/trunk/src/test/java/org/jboss/cache/optimistic/AsyncFullStackInterceptorTest.java
Log:
fixed intermittent failure


Modified: core/trunk/src/test/java/org/jboss/cache/optimistic/AsyncFullStackInterceptorTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/optimistic/AsyncFullStackInterceptorTest.java	2008-09-02 08:41:18 UTC (rev 6668)
+++ core/trunk/src/test/java/org/jboss/cache/optimistic/AsyncFullStackInterceptorTest.java	2008-09-02 09:50:44 UTC (rev 6669)
@@ -3,6 +3,8 @@
 import org.jboss.cache.CacheSPI;
 import org.jboss.cache.Fqn;
 import org.jboss.cache.commands.write.RemoveNodeCommand;
+import org.jboss.cache.commands.write.PutKeyValueCommand;
+import org.jboss.cache.commands.tx.CommitCommand;
 import org.jboss.cache.config.Configuration;
 import org.jboss.cache.loader.SamplePojo;
 import org.jboss.cache.lock.LockManager;
@@ -24,9 +26,6 @@
 @Test(groups = {"functional", "transaction", "optimistic"})
 public class AsyncFullStackInterceptorTest extends AbstractOptimisticTestCase
 {
-   /**
-    * @param name
-    */
    private int groupIncreaser = 0;
 
    public void testSingleInstanceRollback() throws Exception
@@ -237,7 +236,6 @@
    {
       groupIncreaser++;
       CacheSPI<Object, Object> cache = createAsyncReplicatedCache();
-      ReplicationListener replListener = new ReplicationListener(cache);
       CacheSPI<Object, Object> cache2 = createAsyncReplicatedCache();
       ReplicationListener replListener2 = new ReplicationListener(cache2);
       LockManager lockManager = TestingUtil.extractLockManager(cache);
@@ -253,7 +251,7 @@
 
       SamplePojo pojo = new SamplePojo(21, "test");
 
-      replListener2.expectAny();
+      replListener2.expect(PutKeyValueCommand.class, CommitCommand.class);
       cache.put("/one/two", "key1", pojo);
 
       mgr.commit();
@@ -293,6 +291,7 @@
       assertNotNull(cache2.get(Fqn.fromString("/one/two"), "key1"));
 
       replListener2.expect(RemoveNodeCommand.class);
+      replListener2.expect(CommitCommand.class);
       cache.removeNode("/one/two");
       replListener2.waitForReplicationToOccur(1000);
 




More information about the jbosscache-commits mailing list