Fix AxisTest#submitInvalidAxisValue
for plugin BOM
#184
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.
Fix
AxisTest#submitInvalidAxisValue
for plugin BOMjenkinsci/bom#615 describes the problem in more detail.
When the git plugin is loaded along with the matrix project plugin, there are multiple input fields on the job configuration page with the name
_.name
. The previous code waited until there was at least one input field with the name_.name
, but instead it needs to wait for the arrival of an additional input field with the name_.name
.Adds a new
setName
method that sets the value of the_.name
field that was created by this plugin. Previously, it would set the first_.name
field. Setting the first_.name
field works when running the matrix plugin tests without the git plugin loaded, but fails when the git plugin is loaded.The combination of waiting for the correct
_.name
field to appear and setting the value on the correct_.name
field allows one of the four tests to pass when the git plugin is loaded. The remaining tests need more investigation to pass when the git plugin is loaded.Also removes a nearly silent skip of the tests when the input does not appear within the timeout.
Also increases the time between retries so that my fast computer needs only two or three retries. I confirmed on a much slower computer (Intel Core i5-2410M CPU @ 2.30GHz) that even on that slow computer, it found the necessary field in 8 tries or less. The upper bound of 18 tries should be more than enough for all the test environments. The new upper bound on time is 306ms, while the previous upper bound was 300ms. The difference between the two values should not be relevant.
The retry period should not be increased beyond the current ~300ms because one of the tests is using an input form that does not include
_.name
. That test falls through to the end of the retry period.Testing done
Confirmed that the tests pass on several different performance Linux computers.
Confirmed that one previously failing test
AxisTest#submitInvalidAxisValue
now passes even when the git plugin is included as a test dependency.More work will be needed to fix the other
AxisTest
failures when the git plugin is loaded.Submitter checklist