File tree Expand file tree Collapse file tree
src/test/java/org/jenkinsci/plugins/workflow/test/steps Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 <parent >
2929 <groupId >org.jenkins-ci.plugins</groupId >
3030 <artifactId >plugin</artifactId >
31- <version >5.18 </version >
31+ <version >5.24 </version >
3232 <relativePath />
3333 </parent >
3434 <groupId >org.jenkins-ci.plugins.workflow</groupId >
6969 <no-test-jar >false</no-test-jar >
7070 <useBeta >true</useBeta >
7171 <hpi .compatibleSinceVersion>3.0</hpi .compatibleSinceVersion>
72+ <hpi .strictBundledArtifacts>true</hpi .strictBundledArtifacts>
73+ <hpi .bundledArtifacts>jboss-marshalling,jboss-marshalling-river</hpi .bundledArtifacts>
7274 <gitHubRepo >jenkinsci/${project.artifactId}-plugin</gitHubRepo >
7375 </properties >
7476 <dependencyManagement >
Original file line number Diff line number Diff line change 11package org .jenkinsci .plugins .workflow .test .steps ;
22
33import hudson .model .Result ;
4- import hudson .model .queue .QueueTaskFuture ;
54import org .jenkinsci .plugins .workflow .cps .CpsFlowDefinition ;
65import org .jenkinsci .plugins .workflow .job .WorkflowJob ;
76import org .jenkinsci .plugins .workflow .job .WorkflowRun ;
87import org .junit .Rule ;
98import org .junit .Test ;
9+ import org .jvnet .hudson .test .BuildWatcher ;
1010import org .jvnet .hudson .test .JenkinsRule ;
1111
12- import static org .junit .Assert .assertNotNull ;
13-
1412public class SemaphoreStepTest {
1513 @ Rule
1614 public JenkinsRule j = new JenkinsRule ();
1715
16+ @ Rule
17+ public BuildWatcher watcher = new BuildWatcher ();
18+
1819 @ Test
1920 public void hardKill () throws Exception {
2021 WorkflowJob p1 = j .jenkins .createProject (WorkflowJob .class , "p" );
2122 p1 .setDefinition (new CpsFlowDefinition ("echo 'locked!'; semaphore 'wait'" ));
22- QueueTaskFuture <WorkflowRun > future = p1 .scheduleBuild2 (0 );
23- assertNotNull (future );
24- WorkflowRun b = future .waitForStart ();
23+ WorkflowRun b = p1 .scheduleBuild2 (0 ).waitForStart ();
2524 SemaphoreStep .waitForStart ("wait/1" , b );
2625
2726 b .doKill ();
You can’t perform that action at this time.
0 commit comments