aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov <loskutov@gmx.de>2015-10-13 22:24:47 +0300
committerAndrey Loskutov <loskutov@gmx.de>2015-10-13 22:24:47 +0300
commitfd060943daf24873e23a49203be19f7491bd46f7 (patch)
tree9d2f14a9968879d76329bb37db667ae2110556d5
parenteec37d2334bd09271773ee519e20d24e5e90da81 (diff)
downloadjgit-fd060943daf24873e23a49203be19f7491bd46f7.tar.gz
jgit-fd060943daf24873e23a49203be19f7491bd46f7.zip
Test stability: add fsTick() to avoid random testPruneNone() failures
At least on Windows the test failed each second time on the last assert. Adding a small timeout before gc.prune() makes the test stable again. Change-Id: I23d98dd565912c58dcf2f24f3ebc24824670cff3 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcReflogTest.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcReflogTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcReflogTest.java
index 2a096fd1c4..3c781a9474 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcReflogTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcReflogTest.java
@@ -75,6 +75,7 @@ public class GcReflogTest extends GcTestCase {
tr.blob("x");
stats = gc.getStatistics();
assertEquals(9, stats.numberOfLooseObjects);
+ fsTick();
gc.prune(Collections.<ObjectId> emptySet());
stats = gc.getStatistics();
assertEquals(8, stats.numberOfLooseObjects);