HCOLL-185 refactored VanillaChronicleMap and ReplicatedChronicleMap; split BytesMapEventListener from MapEventListener; many bug fixes and optimizations; Stateless client queries without serialization/deserialization not working yet

This commit is contained in:
leventov
2014-11-28 00:05:49 +07:00
parent 38a058e3ce
commit 40a3080ac9
28 changed files with 2527 additions and 1877 deletions
@@ -247,18 +247,20 @@ public class TimeBasedReplicationTest extends JSR166TestCase {
current(timeProvider);
// we do a put at the current time
map.put("key-1", "value-1");
String key1 = "key-1";
map.put(key1, "value-1");
assertEquals(1, map.size());
assertEquals("value-1", map.get("key-1"));
assertEquals("value-1", map.get(key1));
// now test assume that we receive a late update to the map, the following update should be ignored
final long late = System.currentTimeMillis() - TimeUnit.SECONDS.toMillis(5);
assertEquals(null, map.remove("key-1", "value-2", IDENTIFIER, late));
// now test assume that we receive a late update to the map,
// the following update should be ignored
late(timeProvider);
assertFalse(map.remove(key1, "value-2"));
// we'll now flip the time back to the current in order to do the read the result
current(timeProvider);
assertEquals(1, map.size());
assertEquals("value-1", map.get("key-1"));
assertEquals("value-1", map.get(key1));
assertTrue(map.containsValue("value-1"));
assertFalse(map.containsValue("value-2"));
}