Skip to content

Commit

Permalink
Maybe fix spurious error in tests (#402)
Browse files Browse the repository at this point in the history
Race tests will sometimes fail here, there exists ordering of goroutine
execution where ctx.Done() fires firt with Runner and returns here.

Signed-off-by: Jakub Sztandera <[email protected]>
  • Loading branch information
Kubuxu authored Jul 4, 2024
1 parent 543f134 commit ba1a262
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/f3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,9 @@ func (e *testEnv) monitorNodesError(ctx context.Context) {
case <-ctx.Done():
return
case err := <-n.errCh:
if ctx.Err() != nil {
return
}
require.NoError(e.t, err)
}
}(n)
Expand Down

0 comments on commit ba1a262

Please sign in to comment.