Merge branch 'master' of github.com:OpenHFT/Chronicle-Map

This commit is contained in:
Peter Lawrey
2015-02-02 18:52:48 +00:00
3 changed files with 17 additions and 3 deletions
@@ -260,6 +260,19 @@ abstract class AbstractChannelReplicator implements Closeable {
isClosed = true;
// context.close();
executorService.shutdown();
try {
executorService.awaitTermination(5, TimeUnit.MILLISECONDS);
} catch (Exception e) {
executorService.shutdownNow();
try {
executorService.awaitTermination(10, TimeUnit.SECONDS);
} catch (InterruptedException e1) {
LOG.error("", e);
}
}
closeables.closeQuietly();
}
@@ -3,6 +3,7 @@ package net.openhft.chronicle.map;
import net.openhft.lang.model.DataValueClasses;
import net.openhft.lang.model.constraints.MaxSize;
import net.openhft.lang.values.IntValue;
import org.junit.Ignore;
import org.junit.Test;
import java.io.File;
@@ -15,7 +16,7 @@ public class DemoChronicleMapTest {
@Test
public void testMap() throws Exception {
File file = File.createTempFile("DummyOrders", ".test");
File file = File.createTempFile("DummyOrders"+System.currentTimeMillis(), ".test");
file.deleteOnExit();
int maxEntries = 1000;
try (ChronicleMap<IntValue, DemoOrderVOInterface> map = ChronicleMapBuilder
@@ -55,7 +56,7 @@ public class DemoChronicleMapTest {
@Test
public void testMapLocked() throws Exception {
File file = File.createTempFile("DummyOrders", ".test");
File file = File.createTempFile("DummyOrders-"+System.currentTimeMillis(), ".test");
file.deleteOnExit();
int maxEntries = 1000;
try (ChronicleMap<IntValue, DemoOrderVOInterface> map = ChronicleMapBuilder
@@ -46,7 +46,7 @@ public class LargeEntriesTest {
final int ENTRIES = 250;
final int ENTRY_SIZE = 100 * 1024;
File file = File.createTempFile("largeEntries", ".deleteme");
File file = File.createTempFile("largeEntries" + System.currentTimeMillis(), ".deleteme");
file.deleteOnExit();
final ChronicleMap<String, String> map = ChronicleMapBuilder
.of(String.class, String.class)