deleting temporary file after test

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16115 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
huybrechts committed 2009-03-08 21:43:52 +00:00
1 parent 910bcfa5b8
commit 2935258e91
1 file changed
+6 -3
+6 -3
View File
@@ -35,6 +35,8 @@ import java.util.concurrent.Executors;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import org.junit.Assert;
/**
* @author Kohsuke Kawaguchi
*/
@@ -79,7 +81,8 @@ public class FilePathTest extends TestCase {
File tmp = File.createTempFile("testCopyTo","");
FilePath f = new FilePath(french,tmp.getPath());
f.copyTo(new NullStream());
tmp.delete();
Assert.assertTrue("target does not exist", tmp.exists());
Assert.assertTrue("could not delete target " + tmp.getPath(), tmp.delete());
}
/**
@@ -95,8 +98,8 @@ public class FilePathTest extends TestCase {
f.copyTo(f2);
tmp.delete();
tmp2.delete();
Assert.assertTrue("could not delete target " + tmp.getPath(), tmp.delete());
Assert.assertTrue("could not delete target " + tmp2.getPath(), tmp2.delete());
}
}
}