mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
awslogs & archive: prevent 2 goroutine leaks in test functions
Signed-off-by: Ziheng Liu <lzhfromustc@gmail.com>
This commit is contained in:
parent
9e7d5ac5ea
commit
d7bc994a08
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue