aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2013-03-19 13:07:47 -0400
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2013-03-19 13:07:47 -0400
commit509c0b58ee6e38277c360df49d3d6400a3018748 (patch)
tree800c7d58d42d45097937a781cfdaf7ce39d82e5a /org.eclipse.jgit.test
parent60f5f46550a731242f8321301a9f5dc97ac83282 (diff)
parentbd5e4eabc2a949dbce4d968d338106d46ff223df (diff)
downloadjgit-509c0b58ee6e38277c360df49d3d6400a3018748.tar.gz
jgit-509c0b58ee6e38277c360df49d3d6400a3018748.zip
Merge "Fix GC for FileRepo in case packfile renames fail"
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GCTest.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GCTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GCTest.java
index bc60f64886..d5c8f12ef6 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GCTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GCTest.java
@@ -435,6 +435,13 @@ public class GCTest extends LocalDiskRepositoryTestCase {
assertEquals(0, stats.numberOfLooseObjects);
assertEquals(4, stats.numberOfPackedObjects);
assertEquals(1, stats.numberOfPackFiles);
+
+ // Do the gc again and check that it hasn't changed anything
+ gc.gc();
+ stats = gc.getStatistics();
+ assertEquals(0, stats.numberOfLooseObjects);
+ assertEquals(4, stats.numberOfPackedObjects);
+ assertEquals(1, stats.numberOfPackFiles);
}
@Test