PubSubServer server = serversList.get(0);
assertNotNull("There should be at least one pubsub server", server);
DeliveryManager dm = server.getDeliveryManager();
assertNotNull("Delivery manager should not be null once server has started", dm);
assertTrue("Delivery manager is wrong type", dm instanceof FIFODeliveryManager);
final FIFODeliveryManager fdm = (FIFODeliveryManager)dm;
Thread sleeper = new Thread() {
@Override
public void run() {
try {
fdm.suspendProcessing();
wakeupLatch.await();
fdm.resumeProcessing();
} catch (Exception e) {
logger.error("Error suspending delivery manager", e);
}
}
};