diff options
author | Adrian Goerler <adrian.goerler@sap.com> | 2011-07-07 23:16:40 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2011-07-07 23:16:40 +0200 |
commit | ad74bbf9c1744823e32c96a9de9d53576ddb7d9d (patch) | |
tree | b6cc940b59449c006d5a4a67f47045bef63de910 /org.eclipse.jgit.test/tst/org/eclipse/jgit | |
parent | 172a9f05216394f243805844b446cc357dd6b943 (diff) | |
download | jgit-ad74bbf9c1744823e32c96a9de9d53576ddb7d9d.tar.gz jgit-ad74bbf9c1744823e32c96a9de9d53576ddb7d9d.zip |
Cleanup directories leftover by test.
Use the temporary file management from superclass.
Change-Id: I3042951dc21860b4b85dd72a6bf41ee7cfe2aba4
Signed-off-by: Adrian Goerler <adrian.goerler@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit')
3 files changed, 0 insertions, 44 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java index e43ce3431f..76aed91b6d 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CloneCommandTest.java @@ -235,21 +235,4 @@ public class CloneCommandTest extends RepositoryTestCase { assertTrue(e.getMessage().contains(dirName)); } } - - public static File createTempDirectory(String name) throws IOException { - final File temp; - temp = File.createTempFile(name, Long.toString(System.nanoTime())); - - if (!(temp.delete())) { - throw new IOException("Could not delete temp file: " - + temp.getAbsolutePath()); - } - - if (!(temp.mkdir())) { - throw new IOException("Could not create temp directory: " - + temp.getAbsolutePath()); - } - return temp; - } - } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/InitCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/InitCommandTest.java index 797aad4efb..28236369e4 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/InitCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/InitCommandTest.java @@ -50,7 +50,6 @@ import java.io.IOException; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.RepositoryTestCase; -import org.eclipse.jgit.util.FileUtils; import org.junit.Before; import org.junit.Test; @@ -97,13 +96,4 @@ public class InitCommandTest extends RepositoryTestCase { assertNotNull(repository); assertTrue(repository.isBare()); } - - public static File createTempDirectory(String name) throws IOException { - final File temp; - temp = File.createTempFile(name, Long.toString(System.nanoTime())); - FileUtils.delete(temp); - FileUtils.mkdir(temp); - return temp; - } - } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LsRemoteCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LsRemoteCommandTest.java index a4a5a2671b..7d3a55e2af 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LsRemoteCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/LsRemoteCommandTest.java @@ -47,7 +47,6 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; import java.io.File; -import java.io.IOException; import java.util.Collection; import org.eclipse.jgit.lib.Constants; @@ -145,20 +144,4 @@ public class LsRemoteCommandTest extends RepositoryTestCase { } } - public static File createTempDirectory(String name) throws IOException { - final File temp; - temp = File.createTempFile(name, Long.toString(System.nanoTime())); - - if (!(temp.delete())) { - throw new IOException("Could not delete temp file: " - + temp.getAbsolutePath()); - } - - if (!(temp.mkdir())) { - throw new IOException("Could not create temp directory: " - + temp.getAbsolutePath()); - } - return temp; - } - } |