Move BigMGetTests out of the main

Even it isn't harmful, the one useless class in the `.file.test` package looks confusing.

Move it out to the `test` scope and change the dependant projects respectively.
This commit is contained in:
Artem Bilan
2016-02-24 16:59:40 -05:00
parent d4c6713e8a
commit 82c2da8dc4
5 changed files with 14 additions and 11 deletions

View File

@@ -341,6 +341,7 @@ project('spring-integration-ftp') {
compile "org.springframework:spring-context-support:$springVersion"
compile("javax.activation:activation:$javaxActivationVersion", optional)
testCompile "org.apache.ftpserver:ftpserver-core:$ftpServerVersion"
testCompile project(":spring-integration-file").sourceSets.test.output
}
}
@@ -562,6 +563,7 @@ project('spring-integration-sftp') {
compile "org.springframework:spring-context-support:$springVersion"
compile("javax.activation:activation:$javaxActivationVersion", optional)
testCompile "org.apache.sshd:sshd-core:$apacheSshdVersion"
testCompile project(":spring-integration-file").sourceSets.test.output
}
}

View File

@@ -1,5 +0,0 @@
/**
* Provides classes used to support common test cases in modules
* that are dependent on the file module.
*/
package org.springframework.integration.file.test;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 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.
@@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.file.test;
package org.springframework.integration.file;
import java.io.File;
import java.io.FileOutputStream;
@@ -29,6 +30,7 @@ import org.springframework.messaging.support.GenericMessage;
* Created this test because a customer reported hanging with large mget.
*
* Could not reproduce; code is checked in, but test is @Ignored.
*
* @author Gary Russell
* @since 2.2
*
@@ -61,4 +63,5 @@ public abstract class BigMGetTests {
Message<List<File>> results = (Message<List<File>>) resultChannel.receive(600000);
return results;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@@ -30,10 +30,11 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
*/
@ContextConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
public class BigMGetTests extends org.springframework.integration.file.test.BigMGetTests {
public class BigMGetTests extends org.springframework.integration.file.BigMGetTests {
@Test @Ignore // needs directories and server (FTP and SFTP)
public void doTest() throws Exception {
assertEquals(FILES, this.mgetManyFiles().getPayload().size());
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.sftp.outbound;
import static org.junit.Assert.assertEquals;
@@ -30,10 +31,11 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
*/
@ContextConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
public class BigMGetTests extends org.springframework.integration.file.test.BigMGetTests {
public class BigMGetTests extends org.springframework.integration.file.BigMGetTests {
@Test @Ignore // needs directories and server (FTP and SFTP)
public void doTest() throws Exception {
assertEquals(FILES, this.mgetManyFiles().getPayload().size());
}
}