소스 검색

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>
tags/v4.2.0.201511101648-m1
Andrey Loskutov 8 년 전
부모
커밋
fd060943da
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1
    0
      org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcReflogTest.java

+ 1
- 0
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);

Loading…
취소
저장