INT-1614 renamed QueuedSftpSessionPool to CachingSftpSessionFactory and it no longer implements Lifecycle

This commit is contained in:
Mark Fisher
2010-11-19 10:43:55 -05:00
parent 66fea3257e
commit f08299c8b9
5 changed files with 46 additions and 93 deletions

View File

@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.sftp.config;
import static junit.framework.Assert.assertEquals;
@@ -30,7 +31,7 @@ import org.springframework.expression.spel.standard.SpelExpression;
import org.springframework.integration.endpoint.EventDrivenConsumer;
import org.springframework.integration.file.FileNameGenerator;
import org.springframework.integration.sftp.outbound.SftpSendingMessageHandler;
import org.springframework.integration.sftp.session.QueuedSftpSessionPool;
import org.springframework.integration.sftp.session.CachingSftpSessionFactory;
import org.springframework.integration.sftp.session.SimpleSftpSessionFactory;
import org.springframework.integration.test.util.TestUtils;
@@ -56,7 +57,7 @@ public class OutboundChannelAdapaterParserTests {
assertEquals("UTF-8", TestUtils.getPropertyValue(handler, "charset"));
assertNotNull(TestUtils.getPropertyValue(handler, "temporaryBufferFolder"));
assertNotNull(TestUtils.getPropertyValue(handler, "temporaryBufferFolderFile"));
QueuedSftpSessionPool sessionFactory = (QueuedSftpSessionPool) TestUtils.getPropertyValue(handler, "sessionFactory");
CachingSftpSessionFactory sessionFactory = (CachingSftpSessionFactory) TestUtils.getPropertyValue(handler, "sessionFactory");
SimpleSftpSessionFactory clientFactory = (SimpleSftpSessionFactory) TestUtils.getPropertyValue(sessionFactory, "sftpSessionFactory");
assertEquals("localhost", TestUtils.getPropertyValue(clientFactory, "host"));
assertEquals(2222, TestUtils.getPropertyValue(clientFactory, "port"));