diff --git a/pom.xml b/pom.xml index 75cf15942..8242e6c81 100755 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ 4.0.0 chronicle-map - 3.14.5-SNAPSHOT + 3.14.6-SNAPSHOT OpenHFT/Chronicle-Map Chronicle-Map bundle @@ -45,7 +45,7 @@ net.openhft chronicle-bom - 1.14.127 + 1.15.25 pom import diff --git a/src/test/java/eg/WordCountTest.java b/src/test/java/eg/WordCountTest.java index c54364188..3b7670a97 100644 --- a/src/test/java/eg/WordCountTest.java +++ b/src/test/java/eg/WordCountTest.java @@ -21,7 +21,6 @@ import com.google.common.io.ByteStreams; import net.openhft.chronicle.core.io.Closeable; import net.openhft.chronicle.core.values.IntValue; import net.openhft.chronicle.map.ChronicleMap; -import net.openhft.chronicle.map.MapDiagnostics; import net.openhft.chronicle.values.Values; import org.junit.Test; @@ -64,7 +63,6 @@ public class WordCountTest { v.addValue(1); } } - MapDiagnostics.printMapStats(map); } } } diff --git a/src/test/java/net/openhft/chronicle/map/MemoryLeaksTest.java b/src/test/java/net/openhft/chronicle/map/MemoryLeaksTest.java index f25894a16..64ab787c6 100644 --- a/src/test/java/net/openhft/chronicle/map/MemoryLeaksTest.java +++ b/src/test/java/net/openhft/chronicle/map/MemoryLeaksTest.java @@ -24,7 +24,10 @@ import net.openhft.chronicle.core.values.IntValue; import net.openhft.chronicle.hash.serialization.impl.StringSizedReader; import net.openhft.chronicle.hash.serialization.impl.StringUtf8DataAccess; import net.openhft.chronicle.values.Values; -import org.junit.*; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; @@ -37,22 +40,32 @@ import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.Collections; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; import static org.junit.Assert.assertEquals; -@Ignore("flaky test") @RunWith(Parameterized.class) public class MemoryLeaksTest { - @Parameterized.Parameters + @Parameterized.Parameters(name = "{0}") public static Collection data() { List booleans = Arrays.asList(false, true); // Test with all possible combinations of three boolean parameters. return Lists.cartesianProduct(booleans, booleans, booleans) - .stream().map(List::toArray).collect(Collectors.toList()); + .stream().map(flags -> { + final ArrayList namedFlags = new ArrayList<>(Collections.singletonList(named(flags))); + namedFlags.addAll(flags); + return namedFlags; + }).map(List::toArray).collect(Collectors.toList()); + } + + private static String named(final List flags) { + return (!flags.get(0) ? "not " : "") + "replicated, " + + (!flags.get(1) ? "not " : "") + "persisted, " + + (!flags.get(2) ? "not " : "") + "closed within context"; } @Rule @@ -69,7 +82,7 @@ public class MemoryLeaksTest { private final AtomicInteger serializerCount = new AtomicInteger(); private final List> serializers = new ArrayList<>(); - public MemoryLeaksTest(boolean replicated, boolean persisted, boolean closeWithinContext) { + public MemoryLeaksTest(String testType, boolean replicated, boolean persisted, boolean closeWithinContext) { this.persisted = persisted; this.closeWithinContext = closeWithinContext; builder = ChronicleMap