Skip to content

Commit

Permalink
fix: flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
leg100 committed Dec 24, 2024
1 parent 30a3793 commit d4bfbf4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/task/task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ func TestTask_NewReader(t *testing.T) {
require.NoError(t, err)
// stderr and stdout streams can be interwoven, so we use assert.Contains
// rather than assert.Equal
assert.Contains(t, string(got), "foo\nbar\nbaz\nbye\n")
assert.Contains(t, string(got), "err")
assert.Len(t, strings.Fields(string(got)), 5)
assert.Contains(t, strings.Fields(string(got)), "foo")
assert.Contains(t, strings.Fields(string(got)), "bar")
assert.Contains(t, strings.Fields(string(got)), "bye")
assert.Contains(t, strings.Fields(string(got)), "baz")
assert.Contains(t, strings.Fields(string(got)), "err")
}

func TestTask_cancel(t *testing.T) {
Expand Down

0 comments on commit d4bfbf4

Please sign in to comment.