for(int i = 0; i < NUM_JOBS; i++ ) {
final String subTopic = TOPIC + "/sub" + (i % 10);
jobManager.addJob(subTopic, "id" + i, null);
}
// start the queue
q.resume();
while ( count.get() < 2 * NUM_JOBS + 1 ) {
assertEquals("Failed count", 0, q.getStatistics().getNumberOfFailedJobs());
assertEquals("Cancelled count", 0, q.getStatistics().getNumberOfCancelledJobs());
sleep(500);
}