Skip to content

Commit

Permalink
Convert test conditional into a comment (#326)
Browse files Browse the repository at this point in the history
The plugin no longer supports Jenkins versions as old as 2.265, so the
conditional will always evaluate to true.
  • Loading branch information
MarkEWaite authored Jul 22, 2023
1 parent 6f24fa9 commit 7df507b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -772,9 +772,10 @@ private Map<String, String> mapNodeNameToLogText(WorkflowRun workflowRun) throws
@Issue("JENKINS-36547")
@Test public void reuseNodesWithSameLabelsInDifferentReorderedStages() throws Throwable {
sessions.then(r -> {
// Note: for Jenkins versions > 2.65, the number of agents must be increased to 5.
// Note: for Jenkins versions > 2.265, the number of agents must be 5.
// Older Jenkins versions used 3 agents.
// This is due to changes in the Load Balancer (See JENKINS-60563).
int totalAgents = Jenkins.getVersion().isNewerThan(new VersionNumber("2.265")) ? 5 : 3;
int totalAgents = 5;
createNOnlineAgentWithLabels(r, totalAgents, "foo bar");

WorkflowJob p = r.createProject(WorkflowJob.class, "demo");
Expand Down

0 comments on commit 7df507b

Please sign in to comment.