mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-119 removed the reliance on collections-tests
This commit is contained in:
@@ -22,11 +22,11 @@ package net.openhft.collections;
|
||||
import org.junit.*;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
import static net.openhft.collections.Builder.getPersistenceFile;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
@@ -49,6 +49,14 @@ public class ClusterReplicationTest {
|
||||
private ClusterReplicatorBuilder clusterReplicatorBuilder1;
|
||||
|
||||
|
||||
public static File getPersistenceFile() {
|
||||
String TMP = System.getProperty("java.io.tmpdir");
|
||||
File file = new File(TMP + "/test" + System.nanoTime());
|
||||
file.deleteOnExit();
|
||||
return file;
|
||||
}
|
||||
|
||||
|
||||
@Before
|
||||
|
||||
public void setup() throws IOException {
|
||||
|
||||
@@ -30,7 +30,6 @@ import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
import static net.openhft.collections.Builder.getPersistenceFile;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@@ -51,7 +50,7 @@ public class TwoMapOnDifferentServers {
|
||||
.heartBeatInterval(1, SECONDS);
|
||||
|
||||
|
||||
File persistenceFile = getPersistenceFile();
|
||||
File persistenceFile = ClusterReplicationTest.getPersistenceFile();
|
||||
map1 = (ChronicleMap<Integer, CharSequence>) ChronicleMapBuilder.of(Integer.class,
|
||||
CharSequence.class)
|
||||
.entries(1000)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user