Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZBeaconTest: use 127.0.0.1 instead of 255.255.255.255 to get tests passing #705

Merged
merged 1 commit into from
Apr 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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