Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Flaky tests in the master branch

On Sat, Apr 20, 2024 at 11:44 AM Antonin Delpeuch <antonin@xxxxxxxxxxx> wrote:
Hi Matthias,

Thanks for your reply!
On 10/04/2024 23:51, Matthias Sohn wrote:
> Some of the tests (e.g. RacyGitTests) depend on timing which may
> depend on hardware and OS.
> Appreciate any improvement with flaky tests. AFAIK all JGit committers
> use either MacOS or Linux.

Would it make sense to disable or even remove those tests? I could
submit a patch for that. Of course it would be better to fix the tests
so that they keep testing the intended functionality but pass reliably.
While embarking on a journey to debug a race condition in tests which
cover functionality I am unfamiliar with sounds like an interesting
challenge, it's unlikely I can afford to take time for that unfortunately.

The RacyGitTests is a longer story, see
It boils down to using a clock on a computer to determine file modifications
in a filesystem from Java is difficult and depends on many factors.
Though it's still useful to detect regressions we may introduce when running
this test repeatedly on the same OS/filesystem/Java version (which we do on the JGit CI).

I pushed a comment in that test for review which may help new contributors to understand
they don't need to worry if this test turns out to be flaky on their computer.

Given that this seems to be a hurdle for other new contributors (not
just for me), I would say that the detrimental effect of those flaky
tests on contributor experience may outweigh the potential benefit of
them catching a regression in the future. But it's not an easy call to
make for sure.

By the way, I took the time to write up a blog post about my overall
experience contributing to JGit, in case you are interested (it's
something I do for other projects too, I don't mean to single JGit out):

To summarize, the main hurdles I encountered were:

- difficulty to identify where to submit issues and patches

- Eclipse making changes to tracked editor config files

- unreliable test suite

Thanks for your blog pointing out possible improvements to make it easier
for contributors to start contributing. As you mentioned you tried that
at a time when we were moving off infrastructure the Eclipse Foundation
decided to deprecate (Gerrit server at Eclipse, Bugzilla, wiki). Though we didn't
want to stop using Gerrit for code reviews which was quite an endeavour.
Hence we spent more time on making the migration of the git repos from
Gerrit at Eclipse to happen than on updating the documentation
(including the contributor guide) accordingly.

To start addressing your feedback I updated some of the documentation on the Eclipse project portal
and changed the status of the old repos on to hidden, to reduce
confusion which may arise due to finding different versions of the repository
in different places.
I hope it provides interesting insights :) Thanks a lot for your work on
this library!

Thanks for your contributions, I hope we see you again.


Back to the top