Skip to content

Commit

Permalink
Merge pull request #705 from daveyarwood/zbeacontest-127.0.0.1
Browse files Browse the repository at this point in the history
ZBeaconTest: use 127.0.0.1 instead of 255.255.255.255 to get tests passing
  • Loading branch information
trevorbernard committed Apr 3, 2019
2 parents 0fdcb58 + 58dafa0 commit 780c363
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/java/org/zeromq/ZBeaconTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void testUseBuilder() throws InterruptedException, IOException
final CountDownLatch latch = new CountDownLatch(1);
int port = Utils.findOpenPort();
ZBeacon.Builder builder = new ZBeacon.Builder().beacon(new byte[] { 'H', 'Y', 'D', 'R', 'A', 0x01, 0x12, 0x34 })
.ignoreLocalAddress(false).blocking(false).broadcastInterval(2000L).client("255.255.255.255").port(port)
.ignoreLocalAddress(false).blocking(false).broadcastInterval(2000L).client("127.0.0.1").port(port)
.server(new byte[] { 0, 0, 0, 0 });
byte[] prefix = new byte[] { 'H', 'Y', 'D', 'R', 'A', 0x01 };
ZBeacon beacon = builder.build();
Expand All @@ -48,7 +48,7 @@ public void testReceiveOwnBeacons() throws InterruptedException, IOException
byte[] beacon = new byte[] { 'H', 'Y', 'D', 'R', 'A', 0x01, 0x12, 0x34 };
byte[] prefix = new byte[] { 'H', 'Y', 'D', 'R', 'A', 0x01 };
int port = Utils.findOpenPort();
ZBeacon zbeacon = new ZBeacon("255.255.255.255", port, beacon, false);
ZBeacon zbeacon = new ZBeacon("127.0.0.1", port, beacon, false);
zbeacon.setPrefix(prefix);
zbeacon.setListener(new Listener()
{
Expand Down Expand Up @@ -107,7 +107,7 @@ public void testReceiveOwnBeaconsBlocking() throws InterruptedException, IOExcep
byte[] beacon = new byte[] { 'H', 'Y', 'D', 'R', 'A', 0x01, 0x12, 0x34 };
byte[] prefix = new byte[] { 'H', 'Y', 'D', 'R', 'A', 0x01 };
int port = Utils.findOpenPort();
ZBeacon zbeacon = new ZBeacon("255.255.255.255", port, beacon, false, true);
ZBeacon zbeacon = new ZBeacon("127.0.0.1", port, beacon, false, true);
zbeacon.setPrefix(prefix);
zbeacon.setListener(new Listener()
{
Expand Down

0 comments on commit 780c363

Please sign in to comment.