Skip to content

Commit

Permalink
Merge pull request moby#40157 from lzhfromustc/GL_2test
Browse files Browse the repository at this point in the history
awslogs & archive: prevent 2 goroutine leaks in test functions
  • Loading branch information
tonistiigi authored Oct 31, 2019
2 parents 9232e10 + d7bc994 commit 64fd3dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion daemon/logger/awslogs/cloudwatchlogs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/archive/archive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 64fd3dc

Please sign in to comment.