[JENKINS-53172] Make sure the reference build is not running #37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JENKINS-53172
The code to choose a previous run as reference is as follows:
Which AFAIUI does not perform any check about the running status of the potential reference run
As per javadoc
#getResult
alone is not enough guarantee that the run is finished as it can return a value even if the job has not yet finished. And I have found situations where a previous, still running run, is used as the reference. With the consequence of improper parallelization because not all tests have finished (only some of the branches).This PR updates the aforementioned code to add a check for discarding running jobs as reference, created with the intention of get some feedback as I am still running tests on my instance.