Increase timeouts on UDP and JMS topic backed tests.

This commit is contained in:
Gary Russell
2010-04-20 22:19:38 +00:00
parent e890c81a74
commit 6e596a2c3f
2 changed files with 5 additions and 5 deletions

View File

@@ -114,10 +114,10 @@ public class DatagramPacketSendingHandlerTests {
}
}
});
Thread.sleep(1000);
Thread.sleep(3000);
String payload = "foobar";
handler.handleMessage(MessageBuilder.withPayload(payload).build());
assertTrue(latch.await(3000, TimeUnit.MILLISECONDS));
assertTrue(latch.await(10000, TimeUnit.MILLISECONDS));
byte[] src = receivedPacket.getData();
int length = receivedPacket.getLength();
int offset = receivedPacket.getOffset();
@@ -218,13 +218,13 @@ public class DatagramPacketSendingHandlerTests {
Executor executor = Executors.newFixedThreadPool(2);
executor.execute(catcher);
executor.execute(catcher);
Thread.sleep(1000);
Thread.sleep(3000);
MulticastSendingMessageHandler handler =
new MulticastSendingMessageHandler(multicastAddress, testPort, true,
true, "localhost", ackPort, 500000);;
handler.setMinAcksForSuccess(2);
handler.handleMessage(MessageBuilder.withPayload(payload).build());
assertTrue(latch.await(3000, TimeUnit.MILLISECONDS));
assertTrue(latch.await(10000, TimeUnit.MILLISECONDS));
handler.shutDown();
}

View File

@@ -117,7 +117,7 @@ public class JmsDestinationBackedMessageChannelTests {
channel.subscribe(handler1);
channel.subscribe(handler2);
channel.start();
Thread.sleep(1000); // allow time for listener to subscribe
Thread.sleep(5000); // allow time for listener to subscribe
channel.send(new StringMessage("foo"));
channel.send(new StringMessage("bar"));
latch.await(TIMEOUT, TimeUnit.MILLISECONDS);