AMQP-232 Fix Failing Integration Tests

Increase timers to avoid sporadic failures in
the nightly integration test build.
This commit is contained in:
Gary Russell
2012-05-18 09:23:32 -04:00
parent 8f00710120
commit f60eb5e217
2 changed files with 3 additions and 3 deletions

View File

@@ -272,7 +272,7 @@ public class MessageListenerRecoveryCachingConnectionIntegrationTests {
}
private int getTimeout() {
return Math.min(1 + messageCount / (4 * concurrentConsumers), 30);
return Math.min(1 + messageCount / (2 * concurrentConsumers), 30);
}
private SimpleMessageListenerContainer createContainer(String queueName, Object listener,

View File

@@ -183,7 +183,7 @@ public class SimpleMessageListenerContainerIntegrationTests {
for (int i = 0; i < messageCount; i++) {
template.convertAndSend(queue.getName(), i + "foo");
}
boolean waited = latch.await(Math.max(2, messageCount / 40), TimeUnit.SECONDS);
boolean waited = latch.await(Math.max(2, messageCount / 20), TimeUnit.SECONDS);
assertTrue("Timed out waiting for message", waited);
assertNull(template.receiveAndConvert(queue.getName()));
}
@@ -201,7 +201,7 @@ public class SimpleMessageListenerContainerIntegrationTests {
}
}
try {
boolean waited = latch.await(5 + Math.max(1, messageCount / 20), TimeUnit.SECONDS);
boolean waited = latch.await(5 + Math.max(1, messageCount / 10), TimeUnit.SECONDS);
assertTrue("Timed out waiting for message", waited);
} finally {
// Wait for broker communication to finish before trying to stop