Skip to content

Commit 89c2610

Browse files
committed
make termination test more predictable
1 parent f7944bc commit 89c2610

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

errsizedgroup_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,10 @@ func TestErrorSizedGroup_TermOnErr(t *testing.T) {
143143
}
144144

145145
err := ewg.Wait()
146+
t.Logf("error: %v", err)
146147

147148
require.NotNil(t, err)
148-
require.Contains(t, err.Error(), "err from function 100")
149+
assert.Contains(t, err.Error(), "err from function ")
149150
// we don't know how many routines will be executed before the error, but it should be less than 10
150151
require.LessOrEqual(t, c, uint32(errIndex+100), fmt.Sprintf("%d, routines have to be terminated early", c))
151152
}

0 commit comments

Comments
 (0)