Skip to content

Commit 0bd8be5

Browse files
authored
Merge pull request #649 from jglick/stage-deprecation
Adapt `DSLTest.legacyStage` to test only the special case
2 parents 05f2741 + 7440ea5 commit 0bd8be5

File tree

1 file changed

+4
-1
lines changed
  • plugin/src/test/java/org/jenkinsci/plugins/workflow/cps

1 file changed

+4
-1
lines changed

plugin/src/test/java/org/jenkinsci/plugins/workflow/cps/DSLTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,10 @@ public void namedSoleParamForStep() throws Exception {
600600
p.setDefinition(new CpsFlowDefinition(
601601
"stage(name: 'A');\n" +
602602
"echo('done')", true));
603-
WorkflowRun b = r.assertBuildStatusSuccess(p.scheduleBuild2(0));
603+
WorkflowRun b = r.waitForCompletion(p.scheduleBuild2(0).waitForStart());
604+
r.assertLogContains(org.jenkinsci.plugins.workflow.support.steps.stage.Messages.StageStepExecution_non_block_mode_deprecated(), b);
605+
// Special case in DSL.invokeStep:
606+
r.assertLogNotContains("stage step must be called with a body", b);
604607
}
605608

606609
@Test public void standardStage() throws Exception {

0 commit comments

Comments
 (0)