};
closeables.add(discovery);
discovery.start();
discovery.registerService(instance2);
timing.acquireSemaphore(semaphore, 2);
Assert.assertEquals(discovery.queryForInstances("test").size(), 2);
KillSession.kill(client.getZookeeperClient().getZooKeeper(), server.getConnectString());
server.stop();