mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-216 added a fix to the TcpReplicator to stop OP_WRITE from spinning when working with the stateless client - also introduced the Netty like code for patching the
nio selector to reduce object creation.
This commit is contained in:
@@ -62,9 +62,10 @@ public class SingleMapChannelTest {
|
||||
{
|
||||
final TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig
|
||||
.of(8086, new InetSocketAddress("localhost", 8087))
|
||||
.autoReconnectedUponDroppedConnection(true)
|
||||
.heartBeatInterval(1, SECONDS);
|
||||
int maxEntrySize = 1024;
|
||||
byte identifier= 1;
|
||||
byte identifier = 1;
|
||||
hubA = ReplicationHub.builder()
|
||||
.maxEntrySize(maxEntrySize)
|
||||
.tcpTransportAndNetwork(tcpConfig)
|
||||
@@ -79,9 +80,11 @@ public class SingleMapChannelTest {
|
||||
{
|
||||
final TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig
|
||||
.of(8087, new InetSocketAddress("localhost", 8086))
|
||||
.autoReconnectedUponDroppedConnection(true)
|
||||
.heartBeatInterval(1, SECONDS);
|
||||
|
||||
hubB = ReplicationHub.builder().tcpTransportAndNetwork(tcpConfig).createWithId((byte) 2);
|
||||
hubB = ReplicationHub.builder().tcpTransportAndNetwork(tcpConfig).createWithId(
|
||||
(byte) 2);
|
||||
|
||||
// this is how you add maps after the custer is created
|
||||
map1b = ChronicleMapBuilder.of(Integer.class, CharSequence.class)
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
package net.openhft.chronicle.map;
|
||||
|
||||
|
||||
import net.openhft.lang.values.IntValue;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -147,11 +146,12 @@ public class TCPSocketReplication4WayMapTest {
|
||||
private void waitTillEqual(final int timeOutMs) throws InterruptedException {
|
||||
int t = 0;
|
||||
for (; t < timeOutMs; t++) {
|
||||
if (map1.equals(map2) &&
|
||||
map1.equals(map3) &&
|
||||
map2.equals(map3) &&
|
||||
map4.equals(map3) &&
|
||||
map1.equals(map4))
|
||||
if ( map1.equals(map2) &&
|
||||
map1.equals(map3) &&
|
||||
map1.equals(map4) &&
|
||||
map2.equals(map3) &&
|
||||
map2.equals(map4) &&
|
||||
map3.equals(map4))
|
||||
break;
|
||||
Thread.sleep(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user