File tree 1 file changed +5
-1
lines changed
src/test/java/org/jenkins/plugins/lockableresources
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 14
14
import java .util .List ;
15
15
import java .util .concurrent .CyclicBarrier ;
16
16
import java .util .concurrent .Semaphore ;
17
+
18
+ import hudson .model .queue .QueueTaskFuture ;
17
19
import org .jenkinsci .plugins .workflow .cps .CpsFlowDefinition ;
18
20
import org .jenkinsci .plugins .workflow .job .WorkflowJob ;
19
21
import org .jenkinsci .plugins .workflow .job .WorkflowRun ;
@@ -345,7 +347,8 @@ public void parallelLock() throws Exception {
345
347
+ " }\n "
346
348
+ "}\n " ));
347
349
348
- WorkflowRun b1 = p .scheduleBuild2 (0 ).waitForStart ();
350
+ QueueTaskFuture <WorkflowRun > r1 = p .scheduleBuild2 (0 );
351
+ WorkflowRun b1 = r1 .waitForStart ();
349
352
SemaphoreStep .waitForStart ("wait-b/1" , b1 );
350
353
// both messages are in the log because branch b acquired the lock and branch a is waiting to
351
354
// lock
@@ -360,6 +363,7 @@ public void parallelLock() throws Exception {
360
363
isPaused (b1 , 2 , 0 );
361
364
362
365
assertNotNull (LockableResourcesManager .get ().fromName ("resource1" ));
366
+ j .assertBuildStatusSuccess (r1 );
363
367
}
364
368
365
369
@ Test
You can’t perform that action at this time.
0 commit comments