Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,24 @@
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
@SuppressWarnings("ResultOfMethodCallIgnored")
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);
Expand Down