-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a 3 second delay to decrease failures in the threaded submodule test #1122
Add a 3 second delay to decrease failures in the threaded submodule test #1122
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -77,7 +77,7 @@ public void testSubmoduleUpdateWithThreads() throws Exception { | |||
.execute(); | |||
w.git.submoduleInit(); | |||
w.git.submoduleUpdate().threads(3).execute(); | |||
|
|||
Thread.sleep(3000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given execute()
does not return a Future and GitCommands
can take a timeout, shouldn't this be method be considered synchronous?
As such wouldn't this be a production issue and not a test issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not willing at this point to spend the time to investigate if the method is synchronous. I had never seen this test fail in my tests on ci.jenkins.io or in my home lab, but it was a harmless addition, so I accepted it. Will propose a revert to tidy the test a little.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Submitted as:
jenkinsci#1122 (comment) notes that the sleep does not actually help the test other than to delay its completion. This reverts commit fb9d2ca.
#1122 (comment) notes that the sleep does not actually help the test other than to delay its completion. This reverts commit fb9d2ca.
BEE-47337
The test case is failing at the assertion and clearly its the problem at Threads, where in the submoduleUpdate has not been completed yet and its proceeding to the assertions, adding a slight delay will make sure the submoduleupdate is complete.
Checklist
Types of changes
What types of changes does your code introduce?