assertTrue("Threads are leaking: " + ThreadExplorer.show("active sleep") + ", threadCount=" +threadCountAfterStart + " threadCountAfterSleep=" + threadCountAfterSleep,
threadCountAfterSleep < threadCountAfterStart + 8);
connection.close();
broker.stop();
broker.waitUntilStopped();
// testNoDanglingThreadsAfterStop with tcp transport
broker = new BrokerService();
broker.setSchedulerSupport(true);