Skip to content

Commit dcc6cae

Browse files
authored
Merge branch 'master' into flowdurabilitytest-flake
2 parents 669b143 + 4e90600 commit dcc6cae

File tree

7 files changed

+14
-26
lines changed

7 files changed

+14
-26
lines changed

.mvn/extensions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<extension>
33
<groupId>io.jenkins.tools.incrementals</groupId>
44
<artifactId>git-changelist-maven-extension</artifactId>
5-
<version>1.3</version>
5+
<version>1.4</version>
66
</extension>
77
</extensions>

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ Pipeline Groovy script code such as
1010

1111
```groovy
1212
retry(3) {
13-
for (int i = 0; i < 10; i++) {
14-
branches["branch${i}"] = {
15-
node {
16-
retry(3) {
17-
checkout scm
13+
for (int i = 0; i < 10; i++) {
14+
branches["branch${i}"] = {
15+
node {
16+
retry(3) {
17+
checkout scm
18+
}
19+
sh 'make world'
1820
}
19-
sh 'make world'
2021
}
2122
}
2223
}

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<parent>
2929
<groupId>org.jenkins-ci.plugins</groupId>
3030
<artifactId>plugin</artifactId>
31-
<version>4.43.1</version>
31+
<version>4.45</version>
3232
<relativePath />
3333
</parent>
3434
<groupId>org.jenkins-ci.plugins.workflow</groupId>
@@ -288,7 +288,7 @@
288288
<dependency>
289289
<groupId>org.tmatesoft.svnkit</groupId>
290290
<artifactId>svnkit-cli</artifactId>
291-
<version>1.10.1</version>
291+
<version>1.10.7</version>
292292
<scope>test</scope>
293293
</dependency>
294294
</dependencies>

src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,9 @@ public void onFailure(Throwable t) {
962962

963963
/**
964964
* Waits for the workflow to move into the SUSPENDED state.
965+
* @deprecated Use some other idiom, like {@code SemaphoreStep}.
965966
*/
967+
@Deprecated
966968
public void waitForSuspension() throws InterruptedException, ExecutionException {
967969
if (programPromise==null)
968970
return; // the execution has already finished and we are not loading program state anymore

src/test/java/org/jenkinsci/plugins/workflow/SerializationTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ public boolean start() throws Exception {
132132
story.addStep(new Statement() {
133133
@Override public void evaluate() throws Throwable {
134134
rebuildContext(story.j);
135-
assertThatWorkflowIsSuspended();
136135
SemaphoreStep.success("wait/1", null);
137136
story.j.assertBuildStatusSuccess(story.j.waitForCompletion(b));
138137
}

src/test/java/org/jenkinsci/plugins/workflow/SingleJobTestBase.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.jenkinsci.plugins.workflow.cps.CpsFlowExecution;
3232
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
3333
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
34+
import org.jenkinsci.plugins.workflow.test.steps.SemaphoreStep;
3435
import org.junit.Assert;
3536
import org.junit.ClassRule;
3637
import org.junit.Rule;
@@ -70,25 +71,14 @@ public void rebuildContext(JenkinsRule j) throws Exception {
7071
e = (CpsFlowExecution) b.getExecution();
7172
}
7273

73-
/**
74-
* Asserts that {@link #e} is in the suspended state and has nothing more to execute.
75-
*/
76-
public void assertThatWorkflowIsSuspended() throws Exception {
77-
assertThatWorkflowIsSuspended(b, e);
78-
}
79-
80-
public void assertThatWorkflowIsSuspended(WorkflowRun b, CpsFlowExecution e) throws Exception {
81-
e.waitForSuspension(); // it should be in the suspended state
82-
assert b.isBuilding();
83-
}
84-
8574
/** @deprecated use {@link JenkinsRule#waitForCompletion} instead */
8675
public void waitForWorkflowToComplete() throws Exception {
8776
do {
8877
waitForWorkflowToSuspend(e);
8978
} while (!e.isComplete());
9079
}
9180

81+
/** @deprecated Use some other idiom, like {@link SemaphoreStep}. */
9282
public void waitForWorkflowToSuspend() throws Exception {
9383
waitForWorkflowToSuspend(e);
9484
}

src/test/java/org/jenkinsci/plugins/workflow/WorkflowTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ public void evaluate() throws Throwable {
9696
@Override
9797
public void evaluate() throws Throwable {
9898
rebuildContext(story.j);
99-
assertThatWorkflowIsSuspended();
10099
for (int i = 0; i < 600 && !Queue.getInstance().isEmpty(); i++) {
101100
Thread.sleep(100);
102101
}
@@ -141,7 +140,6 @@ private void liveness() {
141140
story.addStep(new Statement() {
142141
@Override public void evaluate() throws Throwable {
143142
rebuildContext(story.j);
144-
assertThatWorkflowIsSuspended();
145143

146144
// resume execution and cause the retry to invoke the body again
147145
SemaphoreStep.success("wait/1", null);
@@ -177,7 +175,6 @@ private void liveness() {
177175
@Override public void evaluate() throws Throwable {
178176
assertEquals(JenkinsRule.DummySecurityRealm.class, jenkins().getSecurityRealm().getClass());
179177
rebuildContext(story.j);
180-
assertThatWorkflowIsSuspended();
181178
story.j.waitForMessage("again running as someone", b);
182179
CheckAuth.finish(true);
183180
story.j.assertLogContains("finally running as someone", story.j.assertBuildStatusSuccess(story.j.waitForCompletion(b)));
@@ -319,7 +316,6 @@ public void onNewHead(FlowNode node) {
319316
story.addStep(new Statement() {
320317
@Override public void evaluate() throws Throwable {
321318
rebuildContext(story.j);
322-
assertThatWorkflowIsSuspended();
323319
SemaphoreStep.success("env/1", null);
324320
story.j.assertBuildStatusSuccess(story.j.waitForCompletion(b));
325321
story.j.assertLogContains("tag=jenkins-demo-1 PERMACHINE=set", b);

0 commit comments

Comments
 (0)