Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Sometimes, the JenkinsRule based tests in the git-plugin can fail intermittently when the default test is set to 180.
It appears pretty often if you just run "mvn test" in the git plugin source code, it is fairly common to see a few tests marked as flaky get re-run and pass on the second run.
If you increase the test timeout to say, 10 minutes, then the tests will pass. A few other tests that aren't marked as flaky also sometimes fail, and it is difficult to debug exactly what's causing them.
[INFO]
[INFO] Results:
[INFO]
[WARNING] Flakes:
[WARNING] hudson.plugins.git.GitChangeSetBadArgsTest.testFindOrCreateEmptyCommitter(hudson.plugins.git.GitChangeSetBadArgsTest)
[ERROR] Run 1: GitChangeSetBadArgsTest>Object.wait:502->Object.wait:-2 » TestTimedOut test ti...
[INFO] Run 2: PASS
[INFO]
[WARNING] hudson.plugins.git.GitPublisherTest.testMergeAndPushFF(hudson.plugins.git.GitPublisherTest)
[ERROR] Run 1: GitPublisherTest>Object.wait:502->Object.wait:-2 » TestTimedOut test timed out...
[INFO] Run 2: PASS
[INFO]
[WARNING] hudson.plugins.git.GitPublisherTest.testMergeAndPushWithSystemEnvVar(hudson.plugins.git.GitPublisherTest)
[ERROR] Run 1: GitPublisherTest>Object.wait:502->Object.wait:-2 » TestTimedOut test timed out...
[INFO] Run 2: PASS
[INFO]
[WARNING] hudson.plugins.git.GitSCMTest.testEmailCommitter(hudson.plugins.git.GitSCMTest)
[ERROR] Run 1: GitSCMTest>Object.wait:502->Object.wait:-2 » TestTimedOut test timed out after...
[INFO] Run 2: PASS
[INFO]
[WARNING] hudson.plugins.git.GitStatusTest.testDoNotifyCommitWithTwoBranches(hudson.plugins.git.GitStatusTest)
[ERROR] Run 1: GitStatusTest>Object.wait:502->Object.wait:-2 » TestTimedOut test timed out af...
[INFO] Run 2: PASS
[INFO]
[WARNING] jenkins.plugins.git.GitStepTest.multipleSCMs(jenkins.plugins.git.GitStepTest)
[ERROR] Run 1: GitStepTest.multipleSCMs
[INFO] Run 2: PASS
[INFO]
[WARNING] jenkins.plugins.git.GitStepTest.roundtrip(jenkins.plugins.git.GitStepTest)
[ERROR] Run 1: GitStepTest.roundtrip:75 » TestTimedOut test timed out after 180 seconds
[INFO] Run 2: PASS
[INFO]
[INFO]
Interestingly, if you single out a test to run manually, it does not timeout, so it is difficult to debug or determine the problem that causes the test to fail.
I suspect that there is some sort of contention issue when running the tests, or something within the test body takes too long sometimes. But I haven't been able to root cause it.
I'll try to update this with more information when I can catch specific tests failing.
I've intentionally based it on 2.60.3 to bring it to Java 8 and still give as many users as possible the chance to update to the new plugin version when it releases, without requiring that they are on the latest Jenkins LTS.
Once the
JENKINS-48061fix is complete, verified, and released, I'll merge the require-jdk-8 branch to master and deliver a beta release of git plugin 4.0.0. At that time, I'll re-evaluate the adoption numbers of various Jenkins releases so that I can follow the same pattern that Stephen Connolly is using with the credentials plugin.