Skip to content

Commit

Permalink
failing ExecutorStepTest in jenkins versions > 2.65 (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
car-roll authored Mar 2, 2021
1 parent a0fd12a commit 594d287
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildPlugin(useAci: true, configurations: [
[platform: 'linux', jdk: '8'],
[platform: 'windows', jdk: '8'],
[platform: 'linux', jdk: '11']
[platform: 'linux', jdk: '11', jenkins: "2.277", javaLevel: 8]
])
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
import java.util.stream.Collectors;
import javax.annotation.Nullable;

import hudson.util.VersionNumber;
import jenkins.model.Jenkins;
import jenkins.security.QueueItemAuthenticator;
import jenkins.security.QueueItemAuthenticatorConfiguration;
Expand Down Expand Up @@ -862,7 +863,10 @@ private Map<String, String> mapNodeNameToLogText(WorkflowRun workflowRun) throws
@Issue("JENKINS-36547")
@Test public void reuseNodesWithSameLabelsInDifferentReorderedStages() {
story.then(r -> {
for (int i = 0; i < 3; ++i) {
// Note: for Jenkins versions > 2.65, the number of agents must be increased to 5.
// This is due to changes in the Load Balancer (See JENKINS-60563).
int totalAgents = Jenkins.getVersion().isNewerThan(new VersionNumber("2.265")) ? 5 : 3;
for (int i = 0; i < totalAgents; ++i) {
DumbSlave slave = r.createOnlineSlave();
slave.setLabelString("foo bar");
}
Expand Down

0 comments on commit 594d287

Please sign in to comment.