Open thaJeztah opened 4 months ago
Looks like the main test goroutine exits before the child goroutine: https://github.com/docker/cli/blob/3f0d90a2a939afa04a784b810dbdb035a0dff669/cli/command/container/run_test.go#L85-L87
Also, the assert.ErrorIs
should only be called in the main goroutine .
I gave it a quick try and synchronized this with a channel, see: https://github.com/docker/cli/commit/c032138ab13bc7c0d26b13ad815aec29709d1585
Looks like the cmd.ExecuteContext doesn't return at all:
root@docker-cli-dev$ go test -run TestRunAttachTermination -v .
=== RUN TestRunAttachTermination
run_test.go:107: cmd.ExecuteContext was not finished before the 5 second timeout
--- FAIL: TestRunAttachTermination (5.01s)
FAIL
FAIL github.com/docker/cli/cli/command/container 5.014s
FAIL
@Benehiko PTAL
I'll take a look when I get the chance
59.68 === Failed
59.68 === FAIL: cli/command/container TestRunAttachTermination (unknown)
59.68 signal: interrupt
59.68
59.68 DONE 2006 tests, 3 skipped, 1 failure in 59.329s
Description
Looks like this test has become flaky again, but .. different; e.g. seen failing on https://github.com/docker/cli/pull/5238