Skip to content
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

Bump parent pom to 3.54 #170

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 31 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>3.47</version>
<version>3.54</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is 3.55 now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even:

Suggested change
<version>3.54</version>
<version>3.57</version>

<relativePath />
</parent>

Expand Down Expand Up @@ -53,8 +53,8 @@
<revision>2.8</revision>
<changelist>-SNAPSHOT</changelist>
<java.level>8</java.level>
<workflow-support.version>2.12</workflow-support.version>
<jenkins.version>2.60.3</jenkins.version>
<workflow-support.version>2.21</workflow-support.version>
<jenkins.version>2.138.4</jenkins.version>
<configuration-as-code.version>1.25</configuration-as-code.version>
</properties>

Expand All @@ -77,7 +77,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<version>1.33</version>
<version>1.39</version>
</dependency>
<dependency>
<groupId>com.infradna.tool</groupId>
Expand Down Expand Up @@ -115,7 +115,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-job</artifactId>
<version>2.0</version>
<version>2.31</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -131,8 +131,34 @@
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit</artifactId>
<version>1.15</version>
<scope>test</scope>
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>2.16</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-api</artifactId>
<version>2.32</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>1.17</version>
</dependency>
</dependencies>
</dependencyManagement>

<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import java.util.List;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.Semaphore;

import hudson.model.queue.QueueTaskFuture;
import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
Expand Down Expand Up @@ -345,21 +347,23 @@ public void parallelLock() throws Exception {
+ " }\n"
+ "}\n"));

WorkflowRun b1 = p.scheduleBuild2(0).waitForStart();
QueueTaskFuture<WorkflowRun> r1 = p.scheduleBuild2(0);
WorkflowRun b1 = r1.waitForStart();
SemaphoreStep.waitForStart("wait-b/1", b1);
// both messages are in the log because branch b acquired the lock and branch a is waiting to
// lock
j.waitForMessage("[b] Lock acquired on [resource1]", b1);
j.waitForMessage("Lock acquired on [resource1]", b1);
j.waitForMessage(
"[a] [resource1] is locked by " + b1.getFullDisplayName() + ", waiting...", b1);
"[resource1] is locked by " + b1.getFullDisplayName() + ", waiting...", b1);
isPaused(b1, 2, 1);

SemaphoreStep.success("wait-b/1", null);

j.waitForMessage("[a] Lock acquired on [resource1]", b1);
j.waitForMessage("Lock acquired on [resource1]", b1);
isPaused(b1, 2, 0);

assertNotNull(LockableResourcesManager.get().fromName("resource1"));
j.assertBuildStatusSuccess(r1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it help to wait some period of time for the Jenkins instance to become idle? In this example, it would wait up to 9 seconds before ending the test.

Suggested change
j.assertBuildStatusSuccess(r1);
j.assertBuildStatusSuccess(r1);
j.waitUntilNoActivityUpTo(9001); // Allow up to 9 seconds for job to finish

}

@Test
Expand Down