This is an automated email from the ASF dual-hosted git repository. aajisaka pushed a commit to branch branch-3.3 in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.3 by this push: new 0f12f3e HADOOP-17036. TestFTPFileSystem failing as ftp server dir already exists. 0f12f3e is described below commit 0f12f3e125c87a9d559798161ec3fceaa04553f8 Author: Mike <m.prya...@gmail.com> AuthorDate: Thu May 14 20:28:00 2020 +0300 HADOOP-17036. TestFTPFileSystem failing as ftp server dir already exists. Contributed by Mikhail Pryakhin. (cherry picked from commit 017d24e9703e9447f88ba94df3a8aa0800de770b) --- .../test/java/org/apache/hadoop/fs/ftp/TestFTPFileSystem.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/ftp/TestFTPFileSystem.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/ftp/TestFTPFileSystem.java index b25990f..8155d8e 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/ftp/TestFTPFileSystem.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/ftp/TestFTPFileSystem.java @@ -55,13 +55,16 @@ import static org.junit.Assert.assertEquals; public class TestFTPFileSystem { private FtpTestServer server; - + private java.nio.file.Path testDir; @Rule public Timeout testTimeout = new Timeout(180000); @Before public void setUp() throws Exception { - server = new FtpTestServer(GenericTestUtils.getTestDir().toPath()).start(); + testDir = Files.createTempDirectory( + GenericTestUtils.getTestDir().toPath(), getClass().getName() + ); + server = new FtpTestServer(testDir).start(); } @After @@ -69,7 +72,7 @@ public class TestFTPFileSystem { public void tearDown() throws Exception { if (server != null) { server.stop(); - Files.walk(server.getFtpRoot()) + Files.walk(testDir) .sorted(Comparator.reverseOrder()) .map(java.nio.file.Path::toFile) .forEach(File::delete); --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org