Buggy code:
public class ReplicatedLevelDBBrokerTest extends ZooKeeperTestSupport { protected static final Logger LOG = LoggerFactory . getLogger ( ReplicatedLevelDBBrokerTest . class ) ; final SynchronousQueue < BrokerService > masterQueue = new SynchronousQueue < BrokerService > ( ) ; ArrayList < BrokerService > brokers = new ArrayList < BrokerService > ( ) ; @ Test ( timeout = ( 1000 * 60 ) * 10 ) public void testAMQ4837viaJMS ( ) throws Throwable { } @ Test ( timeout = ( 1000 * 60 ) * 10 ) public void testAMQ4837viaJMX ( ) throws Throwable { } @ Before public void resetDataDirs ( ) throws IOException { } public interface Client { public void execute ( Connection connection ) throws Exception { } } protected Thread startFailoverClient ( String name , final ReplicatedLevelDBBrokerTest . Client client ) throws IOException , URISyntaxException { } @ Test @ Ignore public void testReplicationQuorumLoss ( ) throws Throwable { } protected void startBrokersAsync ( ArrayList < BrokerService > brokers ) { } protected ArrayList < BrokerService > createBrokerNodes ( ArrayList < BrokerService > brokers ) throws Exception { } protected ArrayList < BrokerService > stopSlaves ( ) throws Exception { } protected void assertStopsWithin ( final BrokerService master , int timeout , TimeUnit unit ) throws InterruptedException { } protected void assertCounterMakesProgress ( final AtomicLong counter , int timeout , TimeUnit unit ) throws InterruptedException { } public void testAMQ4837 ( boolean jmx ) throws Throwable { } private void stop ( BrokerService master ) throws Exception { } private BrokerService waitForNextMaster ( ) throws InterruptedException { } private String pad ( String value , int size ) { } private void startBrokerAsync ( BrokerService b ) { } private void sendMessage ( BrokerService brokerService , String body ) throws Exception { } private ArrayList < String > browseMessages ( BrokerService brokerService , boolean jmx ) throws Exception { } private ArrayList < String > browseMessagesViaJMX ( BrokerService brokerService ) throws Exception { } private ArrayList < String > browseMessagesViaJMS ( BrokerService brokerService ) throws Exception { } private int connectPort ( BrokerService brokerService ) throws IOException , URISyntaxException { } int port ; @ Before public void findFreePort ( ) throws Exception { } @ After public void stopBrokers ( ) throws Exception { } private BrokerService createBrokerNode ( String id ) throws Exception { } private BrokerService createBrokerNode ( String id , int port ) throws Exception { } private ElectingLevelDBStore createStoreNode ( String id ) { ElectingLevelDBStore store = new ElectingLevelDBStore ( ) { @ Override public void start ( ) throws Exception { this . setBrokerName ( "localhost" ) ; super . start ( ) ; } } ; store . setDirectory ( new File ( data_dir ( ) , id ) ) ; store . setContainer ( id ) ; store . setReplicas ( 3 ) ; store . setZkAddress ( ( "localhost:" + ( connector . getLocalPort ( ) ) ) ) ; <START_BUG> store . setZkSessionTmeout ( "15s" ) ; <END_BUG> store . setHostname ( "localhost" ) ; store . setBind ( "tcp:////0.0.0.0:0" ) ; return store ; } }

Fix:
store . setZkSessionTimeout ( "15s" ) ;