mirror of
https://github.com/moby/moby.git
synced 2026-08-04 23:21:00 +00:00
Merge pull request #40157 from lzhfromustc/GL_2test
awslogs & archive: prevent 2 goroutine leaks in test functions
This commit is contained in:
@@ -345,7 +345,7 @@ func TestLogNonBlockingBufferFull(t *testing.T) {
|
||||
logNonBlocking: true,
|
||||
}
|
||||
stream.messages <- &logger.Message{}
|
||||
errorCh := make(chan error)
|
||||
errorCh := make(chan error, 1)
|
||||
started := make(chan bool)
|
||||
go func() {
|
||||
started <- true
|
||||
|
||||
@@ -217,7 +217,7 @@ func TestCmdStreamLargeStderr(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to start command: %s", err)
|
||||
}
|
||||
errCh := make(chan error)
|
||||
errCh := make(chan error, 1)
|
||||
go func() {
|
||||
_, err := io.Copy(ioutil.Discard, out)
|
||||
errCh <- err
|
||||
|
||||
Reference in New Issue
Block a user