mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-134 added support to turn off autoReconnectedUponDroppedConnection - because when node discovery is used ( by nodes broadcasting out their host:port over UDP ), when new or restarted nodes are started up. they attempt to find the nodes on the grid by listening to the host and ports of the other nodes, so these nodes will establish the connection when they come back up, hence under these circumstances, polling a dropped node to attempt to reconnect is no-longer required as the remote node will establish the connection its self on startup.
This commit is contained in:
@@ -1,19 +1,15 @@
|
||||
package net.openhft.chronicle.map;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import net.openhft.lang.io.ByteBufferBytes;
|
||||
import net.openhft.lang.io.Bytes;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class NodeDiscoveryBroadcasterTest extends TestCase {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
// test to stop it erroring with no test
|
||||
}
|
||||
|
||||
|
||||
/* @Test
|
||||
@Ignore
|
||||
public void test() throws IOException, InterruptedException {
|
||||
|
||||
@@ -24,7 +20,15 @@ public class NodeDiscoveryBroadcasterTest extends TestCase {
|
||||
|
||||
final RemoteNodes remoteNodes = new RemoteNodes(identifierBitSetBits);
|
||||
|
||||
BytesExternalizableImpl externalizable = new BytesExternalizableImpl(remoteNodes);
|
||||
UDPEventListener udpEventListener = new UDPEventListener() {
|
||||
|
||||
@Override
|
||||
public void onRemoteNodeEvent(RemoteNodes allNodes, byte remoteProposedId) {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
BytesExternalizableImpl externalizable = new BytesExternalizableImpl(remoteNodes, udpEventListener);
|
||||
|
||||
|
||||
final NodeDiscoveryBroadcaster nodeDiscoveryBroadcaster
|
||||
@@ -39,7 +43,7 @@ public class NodeDiscoveryBroadcasterTest extends TestCase {
|
||||
|
||||
externalizable.add(new InetSocketAddress("myhost", 8888));
|
||||
externalizable.add(new InetSocketAddress("myOtherHost", 8888));
|
||||
externalizable.add((byte) 2);
|
||||
externalizable.add((byte) 2);
|
||||
externalizable.onChange();
|
||||
Thread.sleep(10000);
|
||||
externalizable.add((byte) 2);
|
||||
@@ -71,7 +75,15 @@ public class NodeDiscoveryBroadcasterTest extends TestCase {
|
||||
|
||||
final RemoteNodes remoteNodes = new RemoteNodes(identifierBitSetBits);
|
||||
|
||||
BytesExternalizableImpl externalizable = new BytesExternalizableImpl(remoteNodes);
|
||||
UDPEventListener udpEventListener = new UDPEventListener() {
|
||||
|
||||
@Override
|
||||
public void onRemoteNodeEvent(RemoteNodes allNodes, byte remoteProposedId) {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
BytesExternalizableImpl externalizable = new BytesExternalizableImpl(remoteNodes, udpEventListener);
|
||||
|
||||
|
||||
final NodeDiscoveryBroadcaster nodeDiscoveryBroadcaster
|
||||
@@ -83,6 +95,6 @@ public class NodeDiscoveryBroadcasterTest extends TestCase {
|
||||
Thread.sleep(10000000);
|
||||
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ package net.openhft.chronicle.map;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
@@ -73,7 +72,7 @@ public class UDPSocketReplicationTest {
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
/* @Test
|
||||
// @Ignore
|
||||
public void testBufferOverflow() throws IOException, InterruptedException {
|
||||
|
||||
@@ -84,7 +83,7 @@ public class UDPSocketReplicationTest {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user