HCOLL-134 and HCOLL-145 ( release draft cut of the code so that I can test it across my network )

This commit is contained in:
Rob Austin
2014-09-25 16:42:22 +01:00
parent 96d2fb0ee9
commit 4d889222e3
13 changed files with 693 additions and 30 deletions
@@ -0,0 +1,31 @@
package net.openhft.chronicle.map;
import junit.framework.TestCase;
import net.openhft.lang.io.ByteBufferBytes;
import net.openhft.lang.io.Bytes;
import org.junit.Test;
import java.io.IOException;
import java.net.Inet4Address;
import java.nio.ByteBuffer;
public class NodeDiscoveryHostPortBroadcasterTest extends TestCase {
@Test
public void test() throws IOException, InterruptedException {
final UdpReplicationConfig udpConfig = UdpReplicationConfig
.simple(Inet4Address.getByName("255.255.255.255"), 1235);
final Bytes identifierBitSetBits = new ByteBufferBytes(ByteBuffer.allocate(128 / 8));
final RemoteNodes remoteNodes = new RemoteNodes(identifierBitSetBits);
final NodeDiscoveryHostPortBroadcaster nodeDiscoveryHostPortBroadcaster
= new NodeDiscoveryHostPortBroadcaster(udpConfig, 1024, remoteNodes);
Thread.sleep(5000);
}
}
@@ -18,7 +18,6 @@ package net.openhft.chronicle.map;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import java.io.Closeable;
@@ -43,8 +42,8 @@ public class UDPSocketReplicationTest {
UdpReplicationConfig udpConfig = UdpReplicationConfig
.simple(Inet4Address.getByName("255.255.255.255"), udpPort);
return ChronicleMapBuilder.of(Integer.class, CharSequence.class)
return ChronicleMapBuilder.of(Integer.class, CharSequence.class)
.entries(1000)
.addReplicator(udp((byte) identifier, udpConfig))
.create(Builder.getPersistenceFile());
@@ -75,7 +74,7 @@ public class UDPSocketReplicationTest {
@Test
@Ignore
// @Ignore
public void testBufferOverflow() throws IOException, InterruptedException {
for (int i = 0; i < 1024; i++) {