From 4f7c77df24342194b70e7a26058d73cee8018083 Mon Sep 17 00:00:00 2001 From: dsyer Date: Mon, 8 Mar 2010 08:48:41 +0000 Subject: [PATCH] Extend timeout to prevent spurious failures --- .../BatchMessageListenerContainerIntegrationTests.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-batch-infrastructure-tests/src/test/java/org/springframework/batch/container/jms/BatchMessageListenerContainerIntegrationTests.java b/spring-batch-infrastructure-tests/src/test/java/org/springframework/batch/container/jms/BatchMessageListenerContainerIntegrationTests.java index 6bc383e84..fcab1f027 100644 --- a/spring-batch-infrastructure-tests/src/test/java/org/springframework/batch/container/jms/BatchMessageListenerContainerIntegrationTests.java +++ b/spring-batch-infrastructure-tests/src/test/java/org/springframework/batch/container/jms/BatchMessageListenerContainerIntegrationTests.java @@ -101,7 +101,7 @@ public class BatchMessageListenerContainerIntegrationTests { jmsTemplate.convertAndSend("queue", "bar"); SortedSet result = new TreeSet(); for (int i = 0; i < 2; i++) { - result.add(processed.poll(1, TimeUnit.SECONDS)); + result.add(processed.poll(5, TimeUnit.SECONDS)); } assertEquals("[bar, foo]", result.toString()); } @@ -123,7 +123,7 @@ public class BatchMessageListenerContainerIntegrationTests { container.start(); jmsTemplate.convertAndSend("queue", "foo"); for (int i = 0; i < 2; i++) { - assertEquals("foo", processed.poll(1, TimeUnit.SECONDS)); + assertEquals("foo", processed.poll(5, TimeUnit.SECONDS)); } } @@ -166,8 +166,8 @@ public class BatchMessageListenerContainerIntegrationTests { container.initializeProxy(); container.start(); jmsTemplate.convertAndSend("queue", "foo"); - assertEquals("foo", processed.poll(2, TimeUnit.SECONDS)); - assertEquals("foo", recovered.poll(2, TimeUnit.SECONDS)); + assertEquals("foo", processed.poll(5, TimeUnit.SECONDS)); + assertEquals("foo", recovered.poll(5, TimeUnit.SECONDS)); } }