Skip to content
Merged
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
8 changes: 1 addition & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>support-core</artifactId>
<version>2.32</version>
<version>2.43</version>
<optional>true</optional>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -244,12 +244,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>credentials</artifactId>
<version>2.1.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>config-file-provider</artifactId>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import hudson.model.Slave;
import hudson.model.TaskListener;
import hudson.model.User;
import hudson.slaves.CommandLauncher;
import hudson.slaves.ComputerLauncher;
import hudson.slaves.NodeProperty;
import hudson.slaves.RetentionStrategy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,14 @@ public void traitsSandbox() throws Exception {
@Test
public void curriedClosuresInParallel() throws Exception {
WorkflowJob job = jenkins.jenkins.createProject(WorkflowJob.class, "p");
job.setDefinition(new CpsFlowDefinition("def example_c = { input -> node { echo \"$input\" } }\n" +
job.setDefinition(new CpsFlowDefinition("def example_c = { input -> node { echo \"ate $input\" } }\n" +
"def map = [:]\n" +
"map['spam'] = example_c.curry('spam')\n" +
"map['eggs'] = example_c.curry('eggs')\n" +
"parallel map\n", true));
WorkflowRun b = jenkins.buildAndAssertSuccess(job);
jenkins.assertLogContains("[spam] spam", b);
jenkins.assertLogContains("[eggs] eggs", b);
jenkins.assertLogContains("ate spam", b);
jenkins.assertLogContains("ate eggs", b);
}

@Issue("JENKINS-27916")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private static List<String> stepNames(ListenableFuture<List<StepExecution>> exec
story.j.jenkins.setAuthorizationStrategy(new MockAuthorizationStrategy().
grant(Jenkins.READ, Item.READ).everywhere().toEveryone().
grant(Jenkins.ADMINISTER).everywhere().to("admin").
grant(Item.BUILD).onItems(p).to("dev"));
grant(Item.BUILD, Item.CANCEL).onItems(p).to("dev"));
story.j.jenkins.save();
p.setDefinition(new CpsFlowDefinition("echo 'before'; semaphore 'one'; echo 'after'", true));
WorkflowRun b = p.scheduleBuild2(0).waitForStart();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ static void assertNulledExecution(WorkflowRun run) throws Exception {

/** Verifies all the assumptions about a cleanly finished build. */
static void assertCompletedCleanly(WorkflowRun run) throws Exception {
if (run.isBuilding()) {
System.out.println("Run initially building, going to wait a second to see if it finishes, run="+run);
Thread.sleep(1000);
while (run.isBuilding()) {
Thread.sleep(100); // TODO seems to be unpredictable
}
Assert.assertFalse(run.isBuilding());
Assert.assertNotNull(run.getResult());
FlowExecution fe = run.getExecution();
FlowExecutionList.get().forEach(f -> {
Expand All @@ -74,7 +72,9 @@ static void assertCompletedCleanly(WorkflowRun run) throws Exception {
Assert.assertTrue(cpsExec.isComplete());
Assert.assertTrue(cpsExec.getCurrentHeads().get(0) instanceof FlowEndNode);
Assert.assertTrue(cpsExec.startNodes == null || cpsExec.startNodes.isEmpty());
Assert.assertFalse(cpsExec.blocksRestart());
while (cpsExec.blocksRestart()) {
Thread.sleep(100); // TODO ditto
}
} else {
System.out.println("WARNING: no FlowExecutionForBuild");
}
Expand Down