Skip to content

Commit

Permalink
Merge pull request #137 from jglick/StashTest.smokes
Browse files Browse the repository at this point in the history
Corrected flakes in StashTest
  • Loading branch information
car-roll authored Aug 9, 2021
2 parents 26ca2e8 + 7dffe34 commit 12816c1
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ public class StashTest {
SemaphoreStep.success("ending/1", null);
r.assertBuildStatusSuccess(r.waitForCompletion(b));
r.assertLogContains("got fname: whatever other: more", b);
assertEquals("{}", StashManager.stashesOf(b).toString()); // TODO flake expected:<{[]}> but was:<{[from-top={elsewhere/fname=whatever}, whatever={fname=whatever, other=more}]}>
while (!StashManager.stashesOf(b).isEmpty()) {
Thread.sleep(100);
}
}

@Issue("JENKINS-31086")
Expand Down Expand Up @@ -114,7 +116,9 @@ public class StashTest {
SemaphoreStep.success("ending/1", null);
r.assertBuildStatusSuccess(r.waitForCompletion(b));
r.assertLogContains("Stashed 0 file(s)", b);
assertEquals("{}", StashManager.stashesOf(b).toString());
while (!StashManager.stashesOf(b).isEmpty()) {
Thread.sleep(100);
}
List<FlowNode> coreStepNodes = new DepthFirstScanner().filteredNodes(b.getExecution(), new NodeStepTypePredicate("stash"));
assertThat(coreStepNodes, Matchers.hasSize(1));
assertEquals("whatever", ArgumentsAction.getStepArgumentsAsString(coreStepNodes.get(0)));
Expand Down

0 comments on commit 12816c1

Please sign in to comment.