Merge pull request #40157 from lzhfromustc/GL_2test
awslogs & archive: prevent 2 goroutine leaks in test functions
This commit is contained in:
commit
64fd3dc0d5
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