diff options
author | Andrey Loskutov <loskutov@gmx.de> | 2015-10-13 22:24:47 +0300 |
---|---|---|
committer | Andrey Loskutov <loskutov@gmx.de> | 2015-10-13 22:24:47 +0300 |
commit | fd060943daf24873e23a49203be19f7491bd46f7 (patch) | |
tree | 9d2f14a9968879d76329bb37db667ae2110556d5 | |
parent | eec37d2334bd09271773ee519e20d24e5e90da81 (diff) | |
download | jgit-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.java | 1 |
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); |