Skip to content

Commit 29f32c7

Browse files
author
Niall Pemberton
committed
Clean up after test
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@1006295 13f79535-47bb-0310-9956-ffa450edef68
1 parent 174d05d commit 29f32c7

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/test/java/org/apache/commons/io/input/TailerTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ public TailerTest(String name) {
4141
super(name);
4242
}
4343

44+
@Override
45+
protected void tearDown() throws Exception {
46+
FileUtils.deleteDirectory(getTestDirectory());
47+
}
48+
4449
public void testTailer() throws Exception {
4550

4651
// Create & start the Tailer

src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
import junit.framework.AssertionFailedError;
2929

30+
import org.apache.commons.io.FileUtils;
3031
import org.apache.commons.io.IOUtils;
3132
import org.apache.commons.io.testtools.FileBasedTestCase;
3233

@@ -68,10 +69,9 @@ public void setUp() {
6869
}
6970

7071
@Override
71-
public void tearDown() {
72+
public void tearDown() throws Exception {
73+
FileUtils.deleteDirectory(getTestDirectory());
7274
defaultEncoding = null;
73-
file1.delete();
74-
file2.delete();
7575
textContent = null;
7676
}
7777

0 commit comments

Comments
 (0)