Warning:
ˆ This method uses hashCode and equals of binary form of the key, not the actual implementations of hashCode and equals defined in key's class.
445446447448449450451452453454455
map.put(key, "value"); map.get(key); map.remove(key); assertFalse(map.containsKey(key)); } @Test public void testNearCache_clearFromRemote() { final String mapName = randomMapName(NEAR_CACHE_WITH_INVALIDATION);
604605606607608609610611612613614
service.submit(runnable); final IMap map = client.getMap(mapName); assertTrueEventually(new AssertTask() { public void run() throws Exception { assertTrue(map.containsKey(member.getUuid())); } }); } @Test
626627628629630631632633634635636
final IMap map = client.getMap(mapName); assertEquals(expectedResult, result.get()); assertTrueEventually(new AssertTask() { public void run() throws Exception { assertTrue(map.containsKey(member.getUuid())); } }); } @Test
654655656657658659660661662663664
} }); IMap map = client.getMap(mapName); assertOpenEventually("responseLatch", responseLatch); assertTrue(map.containsKey(member.getUuid())); } @Test public void submitCallablePartitionAware() throws Exception { IExecutorService service = client.getExecutorService(randomString());
670671672673674675676677678679680
Callable<String> callable = new MapPutPartitionAwareCallable<String, String>(mapName, key); Future<String> result = service.submit(callable); assertEquals(member.getUuid(), result.get()); assertTrue(map.containsKey(member.getUuid())); } @Test public void submitCallablePartitionAware_WithExecutionCallback() throws Exception { IExecutorService service = client.getExecutorService(randomString());
699700701702703704705706
} }); assertOpenEventually("responseLatch", responseLatch); assertEquals(member.getUuid(), result.get()); assertTrue(map.containsKey(member.getUuid())); } }
476477478479480481482483484485486
} @Test public void testContainsKey_whenKeyAbsent() { final IMap map = client.getMap(randomString()); assertFalse(map.containsKey("NOT_THERE")); } @Test(expected = NullPointerException.class) public void testContainsKey_whenKeyNull() { final IMap map = client.getMap(randomString());
482483484485486487488489490491492
} @Test(expected = NullPointerException.class) public void testContainsKey_whenKeyNull() { final IMap map = client.getMap(randomString()); map.containsKey(null); } @Test public void testContainsKey_whenKeyPresent() { final IMap map = client.getMap(randomString());
490491492493494495496497498499500
@Test public void testContainsKey_whenKeyPresent() { final IMap map = client.getMap(randomString()); final Object key = "key"; map.put(key, "val"); assertTrue(map.containsKey(key)); } @Test public void testContainsValue_whenValueAbsent() { final IMap map = client.getMap(randomString());
6869707172737475767778
stats.increment("get"); } else if (operation < 3) { map.remove(key); stats.increment("remove"); } else if (operation < 4) { map.containsKey(key); stats.increment("containsKey"); } else if (operation < 5) { Object value = String.valueOf(key); map.containsValue(value); stats.increment("containsValue");