Increase receive timeout for some tests

https://build.spring.io/browse/INT-B41-118

Since `send` to the `discardChannel` caused from the separate Thread (`TaskScheduler` from `groupTimeout`)
there is some time window when receiving thread wait on `queue` lock, so `0` timeout to wait isn't enough
This commit is contained in:
Artem Bilan
2014-10-16 12:27:09 +03:00
parent cc78b9ec51
commit 3081c4ac65
2 changed files with 4 additions and 4 deletions

View File

@@ -340,11 +340,11 @@ public class ResequencerTests {
Message<?> message2 = createMessage("456", "ABC", 3, 2, null);
this.resequencer.handleMessage(message3);
this.resequencer.handleMessage(message2);
Message<?> out1 = replyChannel.receive(0);
Message<?> out1 = replyChannel.receive(10);
assertNull(out1);
out1 = discardChannel.receive(1000);
assertNotNull(out1);
Message<?> out2 = discardChannel.receive(0);
Message<?> out2 = discardChannel.receive(10);
assertNotNull(out2);
Message<?> message1 = createMessage("123", "ABC", 3, 1, null);
this.resequencer.handleMessage(message1);
@@ -372,7 +372,7 @@ public class ResequencerTests {
assertNull(out1);
out1 = discardChannel.receive(1000);
assertNotNull(out1);
Message<?> out2 = discardChannel.receive(0);
Message<?> out2 = discardChannel.receive(10);
assertNotNull(out2);
Message<?> message1 = createMessage("123", "ABC", 3, 1, null);
this.resequencer.handleMessage(message1);

View File

@@ -91,7 +91,7 @@ public class MessagingAnnotationsWithBeanAnnotationTests {
public void testMessagingAnnotationsFlow() {
this.sourcePollingChannelAdapter.start();
for (int i = 0; i < 10; i++) {
Message<?> receive = this.discardChannel.receive(1000);
Message<?> receive = this.discardChannel.receive(10000);
assertNotNull(receive);
assertTrue(((Integer) receive.getPayload()) % 2 == 0);
}