From 10fa2c1a417d66b72907cc91cb57ab5d841a5625 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Sat, 27 Jun 2009 15:29:50 +0000 Subject: [PATCH] Added @Qualifiers since test channel is no longer the only PollableChannel within the context (the "nullChannel" is also present after INT-629). --- .../integration/file/FileToChannelIntegrationTests.java | 7 ++++++- .../http/config/HttpInboundChannelAdapterParserTests.java | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/org.springframework.integration.file/src/test/java/org/springframework/integration/file/FileToChannelIntegrationTests.java b/org.springframework.integration.file/src/test/java/org/springframework/integration/file/FileToChannelIntegrationTests.java index 70142adb50..d9e92a8e00 100644 --- a/org.springframework.integration.file/src/test/java/org/springframework/integration/file/FileToChannelIntegrationTests.java +++ b/org.springframework.integration.file/src/test/java/org/springframework/integration/file/FileToChannelIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,9 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; + import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.integration.channel.PollableChannel; import org.springframework.integration.core.Message; import org.springframework.test.context.ContextConfiguration; @@ -38,9 +40,11 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @ContextConfiguration @RunWith(SpringJUnit4ClassRunner.class) public class FileToChannelIntegrationTests { + private static File inputDir; @Autowired + @Qualifier("fileMessages") PollableChannel fileMessages; @BeforeClass @@ -90,4 +94,5 @@ public class FileToChannelIntegrationTests { assertNotNull(received.getPayload()); assertNull(fileMessages.receive(200)); } + } diff --git a/org.springframework.integration.http/src/test/java/org/springframework/integration/http/config/HttpInboundChannelAdapterParserTests.java b/org.springframework.integration.http/src/test/java/org/springframework/integration/http/config/HttpInboundChannelAdapterParserTests.java index 2b1e17cc9d..151690b113 100644 --- a/org.springframework.integration.http/src/test/java/org/springframework/integration/http/config/HttpInboundChannelAdapterParserTests.java +++ b/org.springframework.integration.http/src/test/java/org/springframework/integration/http/config/HttpInboundChannelAdapterParserTests.java @@ -50,7 +50,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @ContextConfiguration public class HttpInboundChannelAdapterParserTests { - @Autowired + @Autowired @Qualifier("requests") private PollableChannel requests; @Autowired @Qualifier("defaultAdapter")