// check outcome.
ObjectName[] subscribers = broker.getAdminView().getDurableTopicSubscribers();
ObjectName[] inactiveSubscribers = broker.getAdminView().getInactiveDurableTopicSubscribers();
final KahaDBPersistenceAdapter persistenceAdapter = (KahaDBPersistenceAdapter) broker.getPersistenceAdapter();
printDebugClientInfo(subscribers, inactiveSubscribers, persistenceAdapter);
assertEquals("should have only one inactiveSubscriber subscribed", 1, broker.getAdminView().getInactiveDurableTopicSubscribers().length);
assertEquals("should be no subscribers subscribed", 0, broker.getAdminView().getDurableTopicSubscribers().length);
final KahaDBPersistenceAdapter pa = (KahaDBPersistenceAdapter) broker.getPersistenceAdapter();
assertTrue("should be less than 3 journal file left but was: " + persistenceAdapter.getStore().getJournal().getFileMap().size(),
Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return pa.getStore().getJournal().getFileMap().size() <= 3;
}
}, TimeUnit.MINUTES.toMillis(3)));
// Be good and cleanup our mess a bit.
this.houseKeeper.shutdown();