Skip to content

Commit

Permalink
Explain why RacyGitTests may be flaky in some environments
Browse files Browse the repository at this point in the history
Change-Id: I5bbd04754f5f29299a7b9a58a3717e3f615199d0
  • Loading branch information
msohn committed Apr 20, 2024
1 parent 5c1c006 commit e97623d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RacyGitTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@

public class RacyGitTests extends RepositoryTestCase {

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

0 comments on commit e97623d

Please sign in to comment.