HCOLL-167 finally to the stateless map to support a lazy connect

This commit is contained in:
Rob Austin
2014-10-22 19:42:45 +01:00
parent b7c10f6cb7
commit 2b050a9c3c
3 changed files with 109 additions and 68 deletions
@@ -57,7 +57,6 @@ public class StatelessChronicleMapTest extends JSR166TestCase {
this.d = statelessMap;
}
@Override
public File file() {
return null;
@@ -182,7 +181,6 @@ public class StatelessChronicleMapTest extends JSR166TestCase {
}
static ChronicleMap<CharSequence, CharSequence> newStrStrMap(int port) throws
IOException {
@@ -539,6 +537,33 @@ public class StatelessChronicleMapTest extends JSR166TestCase {
}
}
/**
* size returns the correct values
*/
@Test
public void testSize2() throws IOException {
try (ChronicleMap map = map5(8076)) {
try (ChronicleMap empty = newShmIntString(8078)) {
assertEquals(0, empty.size()) ;
assertEquals(5, map.size());
}
}
}
/**
* size returns the correct values
*/
@Test
public void testSize3() throws IOException {
try (ChronicleMap map = map5(8076)) {
try (ChronicleMap empty = newShmIntString(8078)) {
assertEquals(0, empty.size()) ;
assertEquals(5, map.size());
}
}
}
/**
* toString contains toString of elements
*/