Created
October 6, 2011 12:45
-
-
Save mmarkus/1267310 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void tesNonFineGrained() throws Exception { | |
final Cache<String, Object> cache1 = cache(0, "atomic"); | |
final Cache<String, Object> cache2 = cache(1, "atomic"); | |
final AtomicMap<String, String> map1 = AtomicMapLookup.getAtomicMap(cache1, "testMultipleTx", true); | |
final AtomicMap<String, String> map2 = AtomicMapLookup.getAtomicMap(cache1, "testMultipleTx", true); | |
tm(0, "atomic").begin(); | |
map1.put("k1", "v"); | |
final Transaction suspend = tm(0, "atomic").suspend(); | |
tm(0, "atomic").begin(); | |
try { | |
map2.put("k2", "v"); | |
assert false : "this should fail as a WL needs to be acquired here"; | |
} catch (Exception e) { | |
//expected | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment