mirror of
https://github.com/moby/moby.git
synced 2025-07-30 18:23:29 +03:00
test: add buffer to prevent goroutine leak
Signed-off-by: Ziheng Liu <lzhfromustc@gmail.com>
This commit is contained in:
@ -490,7 +490,7 @@ func (s *DockerSuite) TestBuildAddSingleFileToWorkdir(c *testing.T) {
|
||||
}))
|
||||
defer ctx.Close()
|
||||
|
||||
errChan := make(chan error)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
errChan <- buildImage(name, build.WithExternalBuildContext(ctx)).Error
|
||||
close(errChan)
|
||||
@ -833,7 +833,7 @@ COPY test_file .`),
|
||||
}))
|
||||
defer ctx.Close()
|
||||
|
||||
errChan := make(chan error)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
errChan <- buildImage(name, build.WithExternalBuildContext(ctx)).Error
|
||||
close(errChan)
|
||||
|
Reference in New Issue
Block a user