mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
test: amend some misuse of channel in test functions
Signed-off-by: Ziheng Liu <lzhfromustc@gmail.com>
This commit is contained in:
@@ -407,12 +407,11 @@ func TestMaxDownloadAttempts(t *testing.T) {
|
||||
})
|
||||
|
||||
progressChan := make(chan progress.Progress)
|
||||
progressDone := make(chan struct{})
|
||||
defer close(progressChan)
|
||||
|
||||
go func() {
|
||||
for range progressChan {
|
||||
}
|
||||
close(progressDone)
|
||||
}()
|
||||
|
||||
var currentDownloads int32
|
||||
|
||||
@@ -2125,7 +2125,7 @@ func (s *DockerDaemonSuite) TestDaemonStartWithoutColors(c *testing.T) {
|
||||
infoLog := "\x1b[36mINFO\x1b"
|
||||
|
||||
b := bytes.NewBuffer(nil)
|
||||
done := make(chan bool)
|
||||
done := make(chan bool, 1)
|
||||
|
||||
p, tty, err := pty.Open()
|
||||
assert.NilError(c, err)
|
||||
|
||||
Reference in New Issue
Block a user