mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-200 removed the isClosed ( and discussed with Roman why )
This commit is contained in:
@@ -112,7 +112,7 @@ public class TCPSocketReplication3VoidValueTest {
|
||||
map2.put(5, null);
|
||||
|
||||
// allow time for the recompilation to resolve
|
||||
assertTrue("test timed out", waitTillEqual(5000));
|
||||
assertTrue("test timed out", waitTillEqual(15000));
|
||||
|
||||
assertEquals(map3, map3);
|
||||
assertTrue(!map1.isEmpty());
|
||||
|
||||
@@ -45,11 +45,11 @@ public class TCPSocketReplicationBootStrapTest {
|
||||
@Test
|
||||
public void testBootstrap() throws IOException, InterruptedException {
|
||||
|
||||
map1 = newTcpSocketShmIntString((byte) 1, 8079);
|
||||
map1 = newTcpSocketShmIntString((byte) 1, 8069);
|
||||
|
||||
ChronicleMapBuilder<Integer, CharSequence> map2aBuilder =
|
||||
newTcpSocketShmBuilder(Integer.class, CharSequence.class,
|
||||
(byte) 2, 8076, new InetSocketAddress("localhost", 8079));
|
||||
(byte) 2, 8066, new InetSocketAddress("localhost", 8069));
|
||||
final ChronicleMap<Integer, CharSequence> map2a =
|
||||
map2aBuilder.createPersistedTo(getPersistenceFile());
|
||||
map2a.put(10, "EXAMPLE-10"); // this will be the last time that map1 go an update from map2
|
||||
@@ -86,14 +86,16 @@ public class TCPSocketReplicationBootStrapTest {
|
||||
|
||||
@Test
|
||||
public void testBootstrapAndHeartbeat() throws IOException, InterruptedException {
|
||||
map1 = newTcpSocketShmIntString((byte) 1, 8080, new InetSocketAddress("localhost", 8081));
|
||||
map1 = newTcpSocketShmIntString((byte) 1, 8068, new InetSocketAddress("localhost", 8067));
|
||||
ChronicleMapBuilder<Integer, CharSequence> map2aBuilder =
|
||||
newTcpSocketShmBuilder(Integer.class, CharSequence.class, (byte) 2, 8081);
|
||||
newTcpSocketShmBuilder(Integer.class, CharSequence.class, (byte) 2, 8067);
|
||||
|
||||
|
||||
Thread.sleep(1);
|
||||
File persistenceFile = getPersistenceFile();
|
||||
final ReplicatedChronicleMap<Integer, ?, ?, CharSequence, ?, ?> map2a =
|
||||
(ReplicatedChronicleMap<Integer, ?, ?, CharSequence, ?, ?>)
|
||||
map2aBuilder.createPersistedTo(getPersistenceFile());
|
||||
map2aBuilder.createPersistedTo(persistenceFile);
|
||||
|
||||
map2a.put(10, "EXAMPLE-10"); // this will be the last time that map1 go an update from map2
|
||||
|
||||
@@ -105,7 +107,7 @@ public class TCPSocketReplicationBootStrapTest {
|
||||
Thread.yield();
|
||||
} while (lastModificationTime == 0);
|
||||
|
||||
final File map2File = map2a.file();
|
||||
final File map2File = persistenceFile;
|
||||
map2a.close();
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user