diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/channel/ThreadLocalChannelTests.java b/org.springframework.integration/src/test/java/org/springframework/integration/channel/ThreadLocalChannelTests.java index 9a1795d757..f2575e3a3f 100644 --- a/org.springframework.integration/src/test/java/org/springframework/integration/channel/ThreadLocalChannelTests.java +++ b/org.springframework.integration/src/test/java/org/springframework/integration/channel/ThreadLocalChannelTests.java @@ -24,6 +24,7 @@ import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.List; +import org.junit.Before; import org.junit.Test; import org.springframework.integration.core.Message; @@ -34,6 +35,16 @@ import org.springframework.integration.message.StringMessage; */ public class ThreadLocalChannelTests { + @Before + public void clearThreadLocalQueue() { + ThreadLocalChannel channel = new ThreadLocalChannel(); + Message result = null; + do { + result = channel.receive(0); + } while (result != null); + } + + @Test public void testSendAndReceive() { ThreadLocalChannel channel = new ThreadLocalChannel();