From d03a6533cf1f4ca684af79a7bc0c9966ddf5cd50 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Fri, 19 Nov 2010 08:07:32 -0500 Subject: [PATCH] INT-1614 polished SFTP ignored test --- .../remote-test-dir/a.test | 0 .../remote-test-dir/b.test | 0 .../src/test/java/log4j.properties | 8 +++++ ...tpInboundReceiveSample-ignored-context.xml | 19 ++++-------- .../sftp/config/SftpInboundReceiveSample.java | 11 +++++-- .../integration/sftp/config/sftpTest | 30 ------------------- .../integration/sftp/config/sftp_rsa | 30 +++++++++++++++++++ 7 files changed, 52 insertions(+), 46 deletions(-) create mode 100644 spring-integration-sftp/remote-test-dir/a.test create mode 100644 spring-integration-sftp/remote-test-dir/b.test create mode 100644 spring-integration-sftp/src/test/java/log4j.properties delete mode 100644 spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/sftpTest create mode 100644 spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/sftp_rsa diff --git a/spring-integration-sftp/remote-test-dir/a.test b/spring-integration-sftp/remote-test-dir/a.test new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spring-integration-sftp/remote-test-dir/b.test b/spring-integration-sftp/remote-test-dir/b.test new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spring-integration-sftp/src/test/java/log4j.properties b/spring-integration-sftp/src/test/java/log4j.properties new file mode 100644 index 0000000000..c4672eb722 --- /dev/null +++ b/spring-integration-sftp/src/test/java/log4j.properties @@ -0,0 +1,8 @@ +log4j.rootCategory=WARN, stdout + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %t %c{2}:%L - %m%n + +log4j.category.org.springframework=WARN +log4j.category.org.springframework.integration=DEBUG diff --git a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/SftpInboundReceiveSample-ignored-context.xml b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/SftpInboundReceiveSample-ignored-context.xml index 538336f8e3..3595266569 100644 --- a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/SftpInboundReceiveSample-ignored-context.xml +++ b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/SftpInboundReceiveSample-ignored-context.xml @@ -12,16 +12,12 @@ - - - - + + - - - + + filename-pattern=".*\.test$"> - - + - - - - diff --git a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/SftpInboundReceiveSample.java b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/SftpInboundReceiveSample.java index 512f4be56b..91ef2f5c6e 100644 --- a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/SftpInboundReceiveSample.java +++ b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/SftpInboundReceiveSample.java @@ -15,6 +15,10 @@ */ package org.springframework.integration.sftp.config; +import static junit.framework.Assert.assertTrue; + +import java.io.File; + import org.junit.Ignore; import org.junit.Test; @@ -30,9 +34,12 @@ public class SftpInboundReceiveSample { @Ignore public void testInbound() throws Exception{ new ClassPathXmlApplicationContext("SftpInboundReceiveSample-ignored-context.xml", SftpInboundReceiveSample.class); - + Thread.sleep(3000); + File fileA = new File("local-test-dir/a.test"); + File fileB = new File("local-test-dir/a.test"); + assertTrue(new File("local-test-dir/a.test").exists()); + assertTrue(new File("local-test-dir/b.test").exists()); System.out.println("Done"); - Thread.sleep(3000 * 300); } } diff --git a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/sftpTest b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/sftpTest deleted file mode 100644 index 75ab4085e4..0000000000 --- a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/sftpTest +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,FDDF18CD85159ADF - -LIfVRr6qLiHFWcRDBHFVce8dRT7CF/t9eEmIcj756QJGQX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4K++BF1dM7QinHzrDb6/J5bA9MP7/Z4Vpn7V1Pv7eJaLthEK1Lu8av64yMqPK -Mvqj8gN/nJDclO6hIeB67yT8U/SgjQYwWSANuNufwq8PmpTI77nkx0KFCLTE8Nvr -uLK0QQdvmYHZuql1zobqjR78EtOEwY+RKrb5dM7cP7TR1ZBBIrgi/8L+WlnzlPO6 -+qU9Mw2hD1xOQsUQR4CwKdPbQop/wrYCiRasiMh3WXc3ukqGng5+tsUSHQzv7Vwm -SSBeYjlZBOuGEHcWGsNhHD9r1XoJVmJGUjJFua/epbcnNk3A8NOQbY4aOiRdX2EL -f+ebTbDyU/YX1pChgGuHhsVsdVsKmY2s9toK2YcyOM4edfGpv38DFHd+9DsXd6eo -bviIB0OfYnXwO2JTaQBh9lfrV4P8tZphGJsPkviru0lNJX4J5ipHgvIg5EvdPUTs -kKgfERLjzXh9gwJ5zoZRgM22VU9v9ILGGk/zhCjVqYA3Ea0uQt6w6w== ------END RSA PRIVATE KEY----- diff --git a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/sftp_rsa b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/sftp_rsa new file mode 100644 index 0000000000..05a66c803a --- /dev/null +++ b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/sftp_rsa @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,89FEB82756CA8E56 + +TKzzEZLLatyEMrbDVvTOkf6mvdRr/XT8+AZ1ZZfcw02sdUXSVtLMWi1tGhwTzvka +Acl438D+O6WZT/JBvMcST/17KT2CFwgYrFGwxVnDXge5eQ7bHNZ33vPXVNsfmuhx +OtNPy35LiClXt7FP1JpWlubWjXrlWIxCoxOYvQuETTc6t+CMjoRL1rvAv7IdPuso +nT8XO0hwOXIUn5ZVC47ChuQjyisbfL3elSp3vE9T4Jwcb2QIkQ7DAJ6/y79ne7C3 +BTELKnuskK8WDnwaBMJImM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