Skip to content

Commit

Permalink
Update plugin parent POM and BOM (#72)
Browse files Browse the repository at this point in the history
* Update plugin parent POM and BOM

* Wait for builds to finish before cleaning up
  • Loading branch information
basil authored Apr 21, 2022
1 parent 37d6132 commit 5812d95
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
7 changes: 3 additions & 4 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>4.32</version>
<version>4.40</version>
<relativePath />
</parent>

Expand All @@ -17,7 +17,7 @@
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>

<scm>
<connection>scm:git:git://github.com/${gitHubRepo}.git</connection>
<connection>scm:git:https://github.com/${gitHubRepo}.git</connection>
<developerConnection>scm:git:[email protected]:${gitHubRepo}.git</developerConnection>
<url>https://github.com/${gitHubRepo}</url>
<tag>${scmTag}</tag>
Expand All @@ -34,7 +34,6 @@
<properties>
<changelist>999999-SNAPSHOT</changelist>
<jenkins.version>2.303.3</jenkins.version>
<java.level>8</java.level>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
</properties>

Expand All @@ -56,7 +55,7 @@
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.303.x</artifactId>
<version>1090.v0a_33df40457a_</version>
<version>1289.v5c4b_1c43511b_</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ public void timingTest() throws Exception {
WorkflowJob job = j.jenkins.createProject(WorkflowJob.class, "parallelTimes");
job.setDefinition(new CpsFlowDefinition(jobScript, true));
WorkflowRun run = job.scheduleBuild2(0).getStartCondition().get();
try {
Thread.sleep(4000); // We need the short branch to be complete so we know timing should exceed its duration
FlowExecution exec = run.getExecution();
List<FlowNode> heads = exec.getCurrentHeads();
Expand All @@ -388,9 +389,9 @@ public void timingTest() throws Exception {
// Finally, the heart of the matter: test computing durations
TimingInfo times = StatusAndTiming.computeChunkTiming(run, 0, exec.getNode("2"), exec.getNode(entry.getNodeId().toString()), null);
assertTrue("Underestimated duration", times.getTotalDurationMillis() >= 3000);

j.waitForCompletion(run);
j.assertBuildStatusSuccess(run);
} finally {
j.assertBuildStatusSuccess(j.waitForCompletion(run));
}
}

@Test
Expand Down Expand Up @@ -429,6 +430,7 @@ public void testInProgressParallel() throws Exception {
[11]{10}StepAtomNode Test step
*/
WorkflowRun run = job.scheduleBuild2(0).getStartCondition().get();
try {
SemaphoreStep.waitForStart("wait/1", run);
FlowExecution exec = run.getExecution();

Expand Down Expand Up @@ -472,6 +474,9 @@ public void testInProgressParallel() throws Exception {
assertEquals((double) incompleteBranchTime, (double) info.getTotalDurationMillis(), 2.0);

SemaphoreStep.success("wait/1", null);
} finally {
j.assertBuildStatusSuccess(j.waitForCompletion(run));
}
}

@Test
Expand Down Expand Up @@ -671,6 +676,7 @@ public void queuedAndParallel() throws Exception {
"}\n", true));

WorkflowRun b1 = job.scheduleBuild2(0).waitForStart();
try {
SemaphoreStep.waitForStart("wait-b/1", b1);

j.waitForMessage("Still waiting to schedule task", b1);
Expand Down Expand Up @@ -725,7 +731,9 @@ public void queuedAndParallel() throws Exception {
assertEquals(GenericStatus.IN_PROGRESS, StatusAndTiming.condenseStatus(statuses.values()));

SemaphoreStep.success("wait-a/1", null);
j.assertBuildStatusSuccess(j.waitForCompletion(b1));
} finally {
j.assertBuildStatusSuccess(j.waitForCompletion(b1));
}
}

@Test
Expand Down

0 comments on commit 5812d95

Please sign in to comment.