Skip to content

Commit 30ae3c7

Browse files
committed
resolve flakes similar to previous
1 parent 5dc4565 commit 30ae3c7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/java/org/jenkinsci/plugins/workflow/cps/FlowDurabilityTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,7 @@ public void evaluate() throws Throwable {
716716
WorkflowRun run = createAndRunSleeperJob(story.j.jenkins, jobName, FlowDurabilityHint.MAX_SURVIVABILITY, false);
717717
FlowExecution exec = run.getExecution();
718718
if (exec instanceof CpsFlowExecution) {
719+
((CpsFlowExecution) exec).waitForSuspension(); // till done writing head node ID into build.xml
719720
assert ((CpsFlowExecution) exec).getStorage().isPersistedFully();
720721
}
721722
logStart[0] = JenkinsRule.getLog(run);
@@ -745,6 +746,7 @@ public void evaluate() throws Throwable {
745746
FlowExecution exec = run.getExecution();
746747
Assert.assertTrue(((CpsFlowExecution) exec).isResumeBlocked());
747748
if (exec instanceof CpsFlowExecution) {
749+
((CpsFlowExecution) exec).waitForSuspension(); // till done writing head node ID into build.xml
748750
assert ((CpsFlowExecution) exec).getStorage().isPersistedFully();
749751
}
750752
Assert.assertFalse(((CpsFlowExecution) exec).getProgramDataFile().exists());

0 commit comments

Comments
 (0)