mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
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:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user