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,11 +20,14 @@ package net.openhft.chronicle.map;
import net.openhft.chronicle.hash.replication.TimeProvider;
import net.openhft.chronicle.map.jrs166.JSR166TestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import java.io.File;
import java.io.IOException;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import static org.junit.Assert.*;
@@ -44,6 +47,18 @@ public class TimeBasedReplicationTest extends JSR166TestCase {
return file;
}
Set<Thread> threads;
@Before
public void sampleThreads() {
threads = Thread.getAllStackTraces().keySet();
}
@After
public void checkThreadsShutdown() {
StatelessClientTest.checkThreadsShutdown(threads);
}
@Test
public void testIgnoreALatePut() throws IOException {