Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-38052] Test verifying that JENKINS-38052 is fixed.
  • Loading branch information
abayer committed Aug 8, 2017
1 parent 9b52631 commit 37e3fdd
Showing 1 changed file with 13 additions and 0 deletions.
Expand Up @@ -224,4 +224,17 @@ public void traitsSandbox() throws Exception {
jenkins.assertLogContains("org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod jenkins.model.Jenkins getInstance", b);
}

@Issue("JENKINS-38052")
@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" +
"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);
}
}

0 comments on commit 37e3fdd

Please sign in to comment.