MainThread q1 = new MainThread(1, CLIENT_PORT_QP1, quorumCfgSection);
q1.start();
// Let the notifications timeout
Thread.sleep(30000);
long start = System.currentTimeMillis();
q1.shutdown();
long end = System.currentTimeMillis();
if ((end - start) > maxwait) {
Assert.fail("QuorumPeer took " + (end -start) +
" to shutdown, expected " + maxwait);
}