-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/run: fix flaky
RunAttachTermination
test
This test was just incorrect (and testing incorrect behavior): it was checking that `docker run` exited with a `context canceled` error after signalling the CLI/cancelling the command's context, but this was incorrect (and was fixed in 991b130 - which was when this test started failing). However, since this test assertion was happening inside of a goroutine, it would sometimes pass if this assertion didn't get to run before the test suite terminated. It was flaky because sometimes this assertion inside the goroutine did get to execute, but after the test finished execution, which is a big no-no. As an aside, assertions inside goroutines are generally bad, and `govet` even has a linter for this (but it only catches `t.Fatal` and `t.FailNow` calls and not `assert.Xx`. Signed-off-by: Laura Brehm <[email protected]>
- Loading branch information
Showing
1 changed file
with
103 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters