Skip to content

Commit aa9dcde

Browse files
authored
Merge pull request #583 from Riliane/flowdurabilitytest-flake
Accept run not loading at all as a kind of run failure in testDurableAgainstCleanRestartFailsWithDirtyShutdown
2 parents d252824 + f71b27b commit aa9dcde

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
@@ -585,6 +585,7 @@ public void evaluate() throws Throwable {
585585
@Override
586586
public void evaluate() throws Throwable {
587587
WorkflowRun run = story.j.jenkins.getItemByFullName("durableAgainstClean", WorkflowJob.class).getLastBuild();
588+
if (run == null) { return; } //there is a small chance due to non atomic write that build.xml will be empty and the run won't load at all
588589
verifyFailedCleanly(story.j.jenkins, run);
589590
story.j.assertLogContains(logStart[0], run);
590591
}
@@ -616,6 +617,7 @@ public void evaluate() throws Throwable {
616617
@Override
617618
public void evaluate() throws Throwable {
618619
WorkflowRun run = story.j.jenkins.getItemByFullName("durableAgainstClean", WorkflowJob.class).getLastBuild();
620+
if (run == null) { return; } //there is a small chance due to non atomic write that build.xml will be empty and the run won't load at all
619621
verifyFailedCleanly(story.j.jenkins, run);
620622
story.j.assertLogContains(logStart[0], run);
621623
}

0 commit comments

Comments
 (0)