INT-1884 polished test that intermittently break CI

Increased the 'await' time in JdbcMessageStoreChannelIntegrationTests.testTransactionalSendAndReceive(), polished InnerDefinitionHandlerAwareEndpointParserTests.testAggregatorDefinitionSuccess to avoid NPE and increased its receive timeout as well
This commit is contained in:
Oleg Zhurakousky
2011-09-23 11:04:53 -04:00
parent 6ef95da490
commit 789c9d6da1
2 changed files with 5 additions and 2 deletions

View File

@@ -17,6 +17,7 @@
package org.springframework.integration.config.xml;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.io.ByteArrayInputStream;
import java.util.Collection;
@@ -256,7 +257,9 @@ public class InnerDefinitionHandlerAwareEndpointParserTests {
inChannel.send(message);
}
PollableChannel output = (PollableChannel) ac.getBean("outChannel");
assertEquals(0 + 1 + 2 + 3 + 4, output.receive(100).getPayload());
Message<?> receivedMessage = output.receive(2000);
assertNotNull(receivedMessage);
assertEquals(0 + 1 + 2 + 3 + 4, receivedMessage.getPayload());
}
private void testFilterDefinitionSuccess(String configProperty){

View File

@@ -115,7 +115,7 @@ public class JdbcMessageStoreChannelIntegrationTests {
boolean result = input.send(new GenericMessage<String>("foo"), 500L);
// This will time out because the transaction has not committed yet
try {
Service.await(1000);
Service.await(3000);
fail("Expected timeout");
} catch (Exception e) {
// expected