Skip to content

Commit e97623d

Browse files
committed
Explain why RacyGitTests may be flaky in some environments
Change-Id: I5bbd04754f5f29299a7b9a58a3717e3f615199d0
1 parent 5c1c006 commit e97623d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RacyGitTests.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,22 @@
3030

3131
public class RacyGitTests extends RepositoryTestCase {
3232

33+
/**
34+
* This test is inherently flaky in nature since using clocks in a computer
35+
* to determine file modifications in a filesystem from Java is difficult
36+
* and depends on many factors and we can't test all combinations
37+
*
38+
* If this test fails on your computer, don't worry but let us know if you
39+
* are willing to provide details which may help to further improve handling
40+
* of the racy git problem in JGit.
41+
*
42+
* Despite not being completely reproducible this test is still useful to
43+
* detect regressions when running this test repeatedly on the same
44+
* OS/filesystem/Java version (which we do on the CI used to build JGit).
45+
*
46+
* @see "https://git-scm.com/docs/racy-git"
47+
* @see "https://www.youtube.com/watch?v=m44cAozuLNI"
48+
*/
3349
@Test
3450
public void testRacyGitDetection() throws Exception {
3551
// Reset to force creation of index file

0 commit comments

Comments
 (0)