-
Notifications
You must be signed in to change notification settings - Fork 530
Open
Description
Description
The test test: global timmeout(TestGitClone::Git.clone with timeouts) in tests/units/test_git_clone.rb fails intermittently on JRuby.
Test Details
- File:
tests/units/test_git_clone.rb(around line 16) - Test name:
test: global timmeout(TestGitClone::Git.clone with timeouts) - Platform: JRuby 10.0.0.1 (observed in CI)
- Expected:
Git::TimeoutErrorexception when cloning with extremely small timeout (0.00001 seconds) - Actual: No exception raised, test fails
Error Message
Failure: test: global timmeout(TestGitClone::Git.clone with timeouts): <Git::TimeoutError> exception was expected but none was thrown.
/home/runner/work/ruby-git/ruby-git/tests/units/test_git_clone.rb:16:in 'block in TestGitClone'
Reproduction
This test is timing-dependent and fails intermittently. It was observed to:
- Fail on first run in PR fix: use Git::Deprecation.warn for deprecated methods (fixes #842) #846 CI
- Pass on re-run with no code changes
Root Cause
JRuby has different subprocess handling and timing characteristics compared to MRI Ruby. The extremely small timeout value (10 microseconds) creates race conditions in JRuby's process execution.
Proposed Solutions
- Skip this specific test on JRuby platform
- Increase the timeout slightly while keeping it low enough to test the feature
- Add retry logic for timing-sensitive tests on JRuby
- Mark as known flake and document expected intermittent failures
Related
- Observed in PR fix: use Git::Deprecation.warn for deprecated methods (fixes #842) #846 (fix: use Git::Deprecation.warn for deprecated methods (fixes #842) #846)
- JRuby CI consistently shows this as an intermittent failure
Metadata
Metadata
Assignees
Labels
No labels