sendConnection.close();
LOG.info("checking for dangling temp destinations");
// ensure all temp dests get cleaned up on all brokers
for (BrokerService brokerService : brokers) {
final RegionBroker regionBroker = (RegionBroker) brokerService.getRegionBroker();
assertTrue("all temps are gone on " + regionBroker.getBrokerName(), Wait.waitFor(new Wait.Condition(){
@Override
public boolean isSatisified() throws Exception {
Map tempTopics = regionBroker.getTempTopicRegion().getDestinationMap();
LOG.info("temp topics on " + regionBroker.getBrokerName() + ", " + tempTopics);
Map tempQ = regionBroker.getTempQueueRegion().getDestinationMap();
LOG.info("temp queues on " + regionBroker.getBrokerName() + ", " + tempQ);
return tempQ.isEmpty() && tempTopics.isEmpty();
}
}));
}
}