File tree 1 file changed +6
-1
lines changed
src/test/java/com/cloudbees/jenkins/support/impl
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 21
21
import org .jenkinsci .plugins .workflow .job .WorkflowJob ;
22
22
import org .jenkinsci .plugins .workflow .job .WorkflowRun ;
23
23
import org .jenkinsci .plugins .workflow .test .steps .SemaphoreStep ;
24
+ import org .junit .ClassRule ;
24
25
import org .junit .Rule ;
25
26
import org .junit .Test ;
27
+ import org .jvnet .hudson .test .BuildWatcher ;
26
28
import org .jvnet .hudson .test .JenkinsRule ;
27
29
28
30
/**
@@ -33,6 +35,9 @@ public class NodeExecutorsTest {
33
35
@ Rule
34
36
public JenkinsRule j = new JenkinsRule ();
35
37
38
+ @ ClassRule
39
+ public static BuildWatcher bw = new BuildWatcher ();
40
+
36
41
@ Test
37
42
public void addContents () throws Exception {
38
43
DumbSlave agent = j .createOnlineSlave (Label .parseExpression ("test" ), null );
@@ -91,7 +96,7 @@ public void addContentsRunningBuild() throws Exception {
91
96
WorkflowRun workflowRun = Optional .ofNullable (p .scheduleBuild2 (0 ))
92
97
.orElseThrow (AssertionFailedError ::new )
93
98
.waitForStart ();
94
- j . waitForMessage ( "Running on " , workflowRun );
99
+ SemaphoreStep . waitForStart ( "wait/1 " , workflowRun );
95
100
96
101
String executorMd = SupportTestUtils .invokeComponentToMap (new NodeExecutors (), agent .toComputer ())
97
102
.get ("executors.md" );
You can’t perform that action at this time.
0 commit comments