[infinispan-commits] Infinispan SVN: r342 - trunk/core/src/test/java/org/infinispan/replication.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Tue May 26 08:05:43 EDT 2009
Author: vblagojevic at jboss.com
Date: 2009-05-26 08:05:42 -0400 (Tue, 26 May 2009)
New Revision: 342
Modified:
trunk/core/src/test/java/org/infinispan/replication/SyncReplImplicitLockingTest.java
Log:
ns
Modified: trunk/core/src/test/java/org/infinispan/replication/SyncReplImplicitLockingTest.java
===================================================================
--- trunk/core/src/test/java/org/infinispan/replication/SyncReplImplicitLockingTest.java 2009-05-26 11:30:45 UTC (rev 341)
+++ trunk/core/src/test/java/org/infinispan/replication/SyncReplImplicitLockingTest.java 2009-05-26 12:05:42 UTC (rev 342)
@@ -24,6 +24,8 @@
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNull;
+import java.util.HashMap;
+import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -128,9 +130,9 @@
String name = "Infinispan";
TransactionManager mgr = TestingUtil.getTransactionManager(cache1);
mgr.begin();
- // lock node implicitly and start other thread whose write should now block
+ // lock node and start other thread whose write should now block
cache1.put(k, name);
- //automatically locked on another cache node
+ //automatically locked on another cache node
assertLocked(cache2, k);
t.start();
@@ -155,10 +157,26 @@
mgr.begin();
cache1.put(k, name);
-
//automatically locked on another cache node
assertLocked(cache2, k);
+ String key2 = "name";
+ cache1.put(key2, "Vladimir");
+ //automatically locked on another cache node
+ assertLocked(cache2, key2);
+
+ String key3="product";
+ String key4 = "org";
+ Map <String,String> newMap = new HashMap<String,String>();
+ newMap.put(key3, "Infinispan");
+ newMap.put(key4, "JBoss");
+ cache1.putAll(newMap);
+
+ //automatically locked on another cache node
+ assertLocked(cache2, key3);
+ assertLocked(cache2, key4);
+
+
if (useCommit)
mgr.commit();
else
@@ -173,6 +191,9 @@
}
cache2.remove(k);
+ cache2.remove(key2);
+ cache2.remove(key3);
+ cache2.remove(key4);
cleanup();
}
More information about the infinispan-commits
mailing list