131132133134135136137138139140141
} }); client.startSynchronously(); // ping and wait for pong client.ping(); Thread.sleep(500); // restart client client.stop(); Thread.sleep(1000);
140141142143144145146147148149150
client.stop(); Thread.sleep(1000); client.startSynchronously(); // ping and wait for pong client.ping(); Thread.sleep(500); assertEquals(2, pongCount.get()); // now disrupt service
154155156157158159160161162163164
// wait for reconnect Thread.sleep(2000); // ping and wait for pong client.ping(); Thread.sleep(500); // kill all client.stop(); service.stop();