This commit is contained in:
Rob Austin
2014-11-04 14:29:06 +00:00
parent cff7c5bea8
commit a0c89935f5
76 changed files with 1248 additions and 2153 deletions
@@ -18,6 +18,7 @@
package net.openhft.chronicle.set;
import net.openhft.chronicle.hash.replication.TcpConfig;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -25,10 +26,11 @@ import org.junit.Test;
import java.io.Closeable;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.Arrays;
import static java.util.Arrays.asList;
import static java.util.concurrent.TimeUnit.SECONDS;
import static net.openhft.chronicle.map.Builder.getPersistenceFile;
import static net.openhft.chronicle.hash.TcpReplicationConfig.of;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -51,10 +53,9 @@ public class SetForTCPSocketReplicationTest3way {
final int serverPort,
final InetSocketAddress... endpoints) throws IOException {
return (T) ChronicleSetBuilder.of(Integer.class)
.file(getPersistenceFile())
.replicators(identifier, of(serverPort, endpoints)
.replication(identifier, TcpConfig.unknownTopology(serverPort, asList(endpoints))
.heartBeatInterval(1L, SECONDS))
.create();
.createPersistedTo(getPersistenceFile());
}