Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Rosenberg2010-09-09 22:42:07 +0000
committerRobin Rosenberg2010-09-28 21:27:20 +0000
commitafedfc253076398a3369aefd9922d2fe2725ae2d (patch)
treebe1b79cc5ab3a5ca7e8e0d2a7ecee064d1e24caa /org.eclipse.jgit.junit
parent96f45e35f31aee24ac60625801e1085f15cd79f2 (diff)
downloadjgit-afedfc253076398a3369aefd9922d2fe2725ae2d.tar.gz
jgit-afedfc253076398a3369aefd9922d2fe2725ae2d.tar.xz
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.java5
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);
}

Back to the top