From 82f1cbc7151cc30e32aeec952ddcd8ac1318f4e5 Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Sat, 13 Aug 2011 13:45:03 -0400 Subject: [PATCH] INT-1884 Fix Intermittent Test Failure The test is verifying at least one more poll is executed after capturing the initial poll count. However we only did one receive and relying on luck that another poll happened in the interim. Changed to do 2 receives. --- .../monitor/MessageSourceMonitoringIntegrationTests.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/MessageSourceMonitoringIntegrationTests.java b/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/MessageSourceMonitoringIntegrationTests.java index 446caf2e85..d0d780bb16 100644 --- a/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/MessageSourceMonitoringIntegrationTests.java +++ b/spring-integration-jmx/src/test/java/org/springframework/integration/monitor/MessageSourceMonitoringIntegrationTests.java @@ -55,6 +55,7 @@ public class MessageSourceMonitoringIntegrationTests { int before = service.getCounter(); channel.receive(1000L); + channel.receive(1000L); assertTrue(before < service.getCounter()); int count = exporter.getSourceMessageCount(monitor);