Skip to content

Commit

Permalink
fix(test): Flaky TestWorkflowShutdownStrategy (#5331)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarabala1979 authored Mar 8, 2021
1 parent 3dce211 commit 7fc1f2f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions workflow/controller/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5906,9 +5906,10 @@ spec:
command: [sh, -c]
args: ["cowsay hellow"]`)

cancel, controller := newController()
defer cancel()
wf1 := wf.DeepCopy()
wf1.Name = "whalesay-1"
cancel, controller := newController(wf, wf1)
defer cancel()
t.Run("StopStrategy", func(t *testing.T) {
ctx := context.Background()
woc := newWorkflowOperationCtx(wf, controller)
Expand All @@ -5927,7 +5928,8 @@ spec:

node := woc1.wf.Status.Nodes.FindByDisplayName("whalesay")
if assert.NotNil(t, node) {
assert.Contains(t, node.Message, "workflow shutdown with strategy: Stop")
assert.Contains(t, node.Message, "workflow shutdown with strategy")
assert.Contains(t, node.Message, "Stop")
}
})

Expand Down

0 comments on commit 7fc1f2f

Please sign in to comment.