}
waitForMessagesToBeDelivered();
assertEquals("Got all messages", data.length, messages.size());
BrokerService broker = (BrokerService) brokers.get("receiver");
final DemandForwardingBridgeSupport bridge = (DemandForwardingBridgeSupport) broker.getNetworkConnectors().get(0).activeBridges().toArray()[0];
assertTrue("No extra, size:" + bridge.getLocalSubscriptionMap().size(), Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
LOG.info("local subs map size = " + bridge.getLocalSubscriptionMap().size());
return 1 == bridge.getLocalSubscriptionMap().size();
}
}));
}