112113114115116117118119120121122
System.out.println("Stopping reg1"); reg1.stop(); System.out.println("Stopping reg2"); reg2.stop(); System.out.println("Stopping reg3"); reg3.stop(); System.out.println("done"); } @Test public void testDuplicates() throws Exception {
141142143144145146147148149150151
Thread.sleep(200); // now it should work reg2.addEndpoint(ep1); reg2.stop(); } private Endpoint assertExists(HazelcastDomainRegistry reg, String uri) throws InterruptedException { Endpoint ep = reg.getEndpoint(uri); Assert.assertNotNull(ep);