TransportConfiguration live1 = generateTC();
bg.addConnector(live1);
DiscoveryGroup dg1 = new DiscoveryGroupImpl(RandomUtil.randomString(),
RandomUtil.randomString(),
null,
groupAddress,
groupPort,
timeout);
DiscoveryGroup dg2 = new DiscoveryGroupImpl(RandomUtil.randomString(),
RandomUtil.randomString(),
null,
groupAddress,
groupPort,
timeout);
DiscoveryGroup dg3 = new DiscoveryGroupImpl(RandomUtil.randomString(),
RandomUtil.randomString(),
null,
groupAddress,
groupPort,
timeout);
dg1.start();
dg2.start();
dg3.start();
bg.broadcastConnectors();
boolean ok = dg1.waitForBroadcast(1000);
Assert.assertTrue(ok);
List<DiscoveryEntry> entries = dg1.getDiscoveryEntries();
assertEqualsDiscoveryEntries(Arrays.asList(live1), entries);
ok = dg2.waitForBroadcast(1000);
Assert.assertTrue(ok);
entries = dg2.getDiscoveryEntries();
assertEqualsDiscoveryEntries(Arrays.asList(live1), entries);
ok = dg3.waitForBroadcast(1000);
Assert.assertTrue(ok);
entries = dg3.getDiscoveryEntries();
assertEqualsDiscoveryEntries(Arrays.asList(live1), entries);
bg.stop();
dg1.stop();
dg2.stop();
dg3.stop();
}