diff --git a/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java b/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java index 0004e2081..7ef2ea9e5 100644 --- a/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java @@ -235,6 +235,12 @@ class StatelessChronicleMap implements ChronicleMap, Closeable { if (closeables != null) closeables.closeQuietly(); closeables = null; + try { + // give time to close + Thread.sleep(10); + } catch (InterruptedException e) { + // + } } /** diff --git a/src/test/java/net/openhft/chronicle/map/jrs166/map/StatelessChronicleMapTest.java b/src/test/java/net/openhft/chronicle/map/jrs166/map/StatelessChronicleMapTest.java index bbde965bb..c7f608e68 100644 --- a/src/test/java/net/openhft/chronicle/map/jrs166/map/StatelessChronicleMapTest.java +++ b/src/test/java/net/openhft/chronicle/map/jrs166/map/StatelessChronicleMapTest.java @@ -561,7 +561,7 @@ public class StatelessChronicleMapTest extends JSR166TestCase { /** * size returns the correct values */ - @Test(timeout = 5000) + @Test(timeout = 10000) public void testSize2() throws IOException { try (ChronicleMap map = map5(8076)) { @@ -619,7 +619,7 @@ public class StatelessChronicleMapTest extends JSR166TestCase { */ @Test(timeout = 5000) public void testContainsKey_NullPointerException() throws IOException { - try (ChronicleMap c = newShmIntString(8079)) { + try (ChronicleMap c = newShmIntString(8076)) { c.containsKey(null); shouldThrow(); } catch (NullPointerException success) {