Starting bus after the messages have been sent to the channel.
This commit is contained in:
@@ -95,14 +95,15 @@ public class FixedDelayConsumerTests {
|
||||
subscription.setEndpoint("testEndpoint");
|
||||
subscription.setPolicy(policy);
|
||||
bus.activateSubscription(subscription);
|
||||
bus.start();
|
||||
for (int i = 0; i < messagesToSend; i++) {
|
||||
channel.send(new GenericMessage<String>(1, "test " + (i+1)));
|
||||
}
|
||||
bus.start();
|
||||
latch.await(80, TimeUnit.MILLISECONDS);
|
||||
int count = counter.get();
|
||||
assertTrue("received " + count + ", expected less than 10", counter.get() < 10);
|
||||
assertTrue("received " + count + ", expected more than 7", counter.get() > 7);
|
||||
bus.stop();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user