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

This commit is contained in:
Rob Austin
2014-10-06 15:05:18 +01:00
parent 2b3ec75bd0
commit 6c0ec26911
4 changed files with 74 additions and 24 deletions
@@ -1,12 +1,27 @@
package net.openhft.chronicle.map;
import org.junit.Ignore;
import org.junit.Test;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.util.Enumeration;
public class NodeDiscoveryTest {
@Test
@Ignore
public void testDiscoverMap() throws Exception {
final NodeDiscovery nodeDiscovery = new NodeDiscovery();
final ChronicleMap<Integer, CharSequence> map = nodeDiscovery.discoverMap(8123, 1237);
NetworkInterface en0 = NetworkInterface.getByName("en0");
Enumeration<InetAddress> inetAddresses = en0.getInetAddresses();
AddressAndPort ourAddressAndPort1 = new AddressAndPort(inetAddresses.nextElement().getAddress(),
(short) 1237);
final ChronicleMap<Integer, CharSequence> map = nodeDiscovery.discoverMap(8123, ourAddressAndPort1);
Thread.sleep(1000000);
}
}