long begin = System.currentTimeMillis();
cnxManager.toSend(2L, createMsg(ServerState.LOOKING.ordinal(), 1, -1, 1));
long end = System.currentTimeMillis();
if((end - begin) > 6000) Assert.fail("Waited more than necessary");
cnxManager.halt();
Assert.assertFalse(cnxManager.listener.isAlive());
}
/**
* Tests a bug in QuorumCnxManager that causes a spin lock