From fd060943daf24873e23a49203be19f7491bd46f7 Mon Sep 17 00:00:00 2001 From: Andrey Loskutov Date: Tue, 13 Oct 2015 22:24:47 +0300 Subject: [PATCH] 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 --- .../tst/org/eclipse/jgit/internal/storage/file/GcReflogTest.java | 1 + 1 file changed, 1 insertion(+) 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 2a096fd1c..3c781a947 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. emptySet()); stats = gc.getStatistics(); assertEquals(8, stats.numberOfLooseObjects);