Improve test robustness and park flaky tests.

This commit is contained in:
Peter Lawrey
2014-11-30 22:05:33 +02:00
parent 6fdfc9184c
commit 6dc1792f19
25 changed files with 526 additions and 272 deletions
@@ -20,6 +20,7 @@ package net.openhft.chronicle.map;
import net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.io.Closeable;
@@ -27,6 +28,7 @@ import java.io.File;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.Arrays;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import static net.openhft.chronicle.map.Builder.getPersistenceFile;
@@ -155,6 +157,17 @@ public class TCPSocketReplicationBootStrapTest {
System.gc();
}
Set<Thread> threads;
@Before
public void sampleThreads() {
threads = Thread.getAllStackTraces().keySet();
}
@After
public void checkThreadsShutdown() {
StatelessClientTest.checkThreadsShutdown(threads);
}
/**
* waits until map1 and map2 show the same value