diff options
author | Robin Rosenberg <robin.rosenberg@dewire.com> | 2010-09-10 00:42:07 +0200 |
---|---|---|
committer | Robin Rosenberg <robin.rosenberg@dewire.com> | 2010-09-28 23:27:20 +0200 |
commit | afedfc253076398a3369aefd9922d2fe2725ae2d (patch) | |
tree | be1b79cc5ab3a5ca7e8e0d2a7ecee064d1e24caa /org.eclipse.jgit.junit | |
parent | 96f45e35f31aee24ac60625801e1085f15cd79f2 (diff) | |
download | jgit-afedfc253076398a3369aefd9922d2fe2725ae2d.tar.gz jgit-afedfc253076398a3369aefd9922d2fe2725ae2d.zip |
Comment the use of System.gc in LocalDiskRepositoryTestCase
Change-Id: Ic5e9bda4275006ef3bf6ea6255ddf1c0eecc3770
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Diffstat (limited to 'org.eclipse.jgit.junit')
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java index 568fcdcd0e..dd143826ec 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java @@ -119,6 +119,11 @@ public abstract class LocalDiskRepositoryTestCase extends TestCase { shutdownHook = new Thread() { @Override public void run() { + // On windows accidentally open files or memory + // mapped regions may prevent files from being deleted. + // Suggesting a GC increases the likelihood that our + // test repositories actually get removed after the + // tests, even in the case of failure. System.gc(); recursiveDelete("SHUTDOWN", trash, false, false); } |