[jbosscache-commits] JBoss Cache SVN: r5756 - core/branches/2.1.X/src/test/java/org/jboss/cache/optimistic.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Tue Apr 29 12:06:40 EDT 2008


Author: manik.surtani at jboss.com
Date: 2008-04-29 12:06:40 -0400 (Tue, 29 Apr 2008)
New Revision: 5756

Modified:
   core/branches/2.1.X/src/test/java/org/jboss/cache/optimistic/CacheTest.java
Log:
JBCACHE-1326: Fixed tests that relied on this leak

Modified: core/branches/2.1.X/src/test/java/org/jboss/cache/optimistic/CacheTest.java
===================================================================
--- core/branches/2.1.X/src/test/java/org/jboss/cache/optimistic/CacheTest.java	2008-04-29 16:06:20 UTC (rev 5755)
+++ core/branches/2.1.X/src/test/java/org/jboss/cache/optimistic/CacheTest.java	2008-04-29 16:06:40 UTC (rev 5756)
@@ -208,13 +208,13 @@
       TransactionTable table = c.getTransactionTable();
       OptimisticTransactionEntry entry = (OptimisticTransactionEntry) table.get(gtx);
       assertNotNull(mgr.getTransaction());
+      MethodCall meth = entry.getModifications().get(0);
       mgr.commit();
 
       GlobalTransaction remoteGtx = new GlobalTransaction();
 
       remoteGtx.setAddress(new DummyAddress());
       //hack the method call to make it have the remote gtx
-      MethodCall meth = entry.getModifications().get(0);
 
       meth.getArgs()[0] = remoteGtx;
       //call our remote method
@@ -229,11 +229,8 @@
       assertNotNull(table.get(remoteGtx));
       assertNotNull(table.getLocalTransaction(remoteGtx));
       //assert that this is populated
-      assertEquals(1, table.get(remoteGtx).getModifications().size());
-
       //assert that the remote prepare has populated the local workspace
       assertEquals(3, entry.getTransactionWorkSpace().getNodes().size());
-      assertEquals(1, entry.getModifications().size());
       List<?> calls = dummy.getAllCalled();
       assertEquals(MethodDeclarations.optimisticPrepareMethod, calls.get(2));
 




More information about the jbosscache-commits mailing list