remove timing depdendency

This commit is contained in:
gtully 2015-04-13 16:46:08 +01:00
parent 4441001c42
commit 7dc522d4c3
1 changed files with 7 additions and 0 deletions

View File

@ -75,6 +75,13 @@ public class DemandForwardingBridgeTest extends NetworkTestSupport {
connection1.send(consumerInfo1.createRemoveCommand()); connection1.send(consumerInfo1.createRemoveCommand());
final DestinationStatistics destinationStatistics = broker.getDestination(destination).getDestinationStatistics(); final DestinationStatistics destinationStatistics = broker.getDestination(destination).getDestinationStatistics();
Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return 1 == destinationStatistics.getDispatched().getCount();
}
});
assertEquals("broker dest stat dispatched", 1, destinationStatistics.getDispatched().getCount()); assertEquals("broker dest stat dispatched", 1, destinationStatistics.getDispatched().getCount());
assertEquals("broker dest stat dequeues", 0, destinationStatistics.getDequeues().getCount()); assertEquals("broker dest stat dequeues", 0, destinationStatistics.getDequeues().getCount());
assertEquals("broker dest stat forwards", 0, destinationStatistics.getForwards().getCount()); assertEquals("broker dest stat forwards", 0, destinationStatistics.getForwards().getCount());