HCOLL-329 fixing the bootstrapping timestamp issue

This commit is contained in:
Rob Austin
2015-05-29 19:09:54 +01:00
parent 7ceefca5d5
commit 80c80ff672
9 changed files with 170 additions and 47 deletions
@@ -21,6 +21,7 @@ package net.openhft.chronicle.map;
import net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import java.io.Closeable;
@@ -56,12 +57,17 @@ public class TCPSocketReplication3wayPutReturnsNullTest {
.replication(identifier, tcpConfig).create();
}
int portOffset = 0;
@Before
public void setup() throws IOException {
map1 = newTcpSocketShmIntString((byte) 1, 8026, new InetSocketAddress("localhost", 8027),
new InetSocketAddress("localhost", 8028));
map2 = newTcpSocketShmIntString((byte) 2, 8027, new InetSocketAddress("localhost", 8028));
map3 = newTcpSocketShmIntString((byte) 3, 8028);
map1 = newTcpSocketShmIntString((byte) 1, portOffset + 8026, new InetSocketAddress
("localhost", portOffset + 8027),
new InetSocketAddress("localhost", portOffset + 8028));
map2 = newTcpSocketShmIntString((byte) 2, portOffset + 8027, new InetSocketAddress
("localhost", portOffset + 8028));
map3 = newTcpSocketShmIntString((byte) 3, portOffset + 8028);
portOffset += 10;
}
@After
@@ -89,6 +95,7 @@ public class TCPSocketReplication3wayPutReturnsNullTest {
StatelessClientTest.checkThreadsShutdown(threads);
}
@Ignore
@Test
public void test3() throws IOException, InterruptedException {
@@ -20,11 +20,11 @@ public class TestReplication {
TcpTransportAndNetworkConfig tcpConfigServer1 =
TcpTransportAndNetworkConfig.of(8082);
TcpTransportAndNetworkConfig.of(8092);
TcpTransportAndNetworkConfig tcpConfigServer2 =
TcpTransportAndNetworkConfig.of(8083, new InetSocketAddress("localhost",
8082));
TcpTransportAndNetworkConfig.of(8093, new InetSocketAddress("localhost",
8092));
final ChronicleMap<Integer, Integer> map2 = ChronicleMapBuilder.of(Integer.class,
Integer.class)
@@ -42,9 +42,7 @@ public class TestReplication {
map1.put(i, i);
}
for (int i = 0; i < 10; i++) {
Thread.sleep(100);
System.out.println(map2.size());
}