mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
test: add buffer to prevent goroutine leak
Signed-off-by: Ziheng Liu <lzhfromustc@gmail.com>
This commit is contained in:
@@ -82,8 +82,8 @@ func testConcurrentPullWholeRepo(c *testing.T) {
|
||||
dockerCmd(c, args...)
|
||||
|
||||
// Run multiple re-pulls concurrently
|
||||
results := make(chan error)
|
||||
numPulls := 3
|
||||
results := make(chan error, numPulls)
|
||||
|
||||
for i := 0; i != numPulls; i++ {
|
||||
go func() {
|
||||
@@ -120,8 +120,8 @@ func testConcurrentFailingPull(c *testing.T) {
|
||||
repoName := fmt.Sprintf("%v/dockercli/busybox", privateRegistryURL)
|
||||
|
||||
// Run multiple pulls concurrently
|
||||
results := make(chan error)
|
||||
numPulls := 3
|
||||
results := make(chan error, numPulls)
|
||||
|
||||
for i := 0; i != numPulls; i++ {
|
||||
go func() {
|
||||
@@ -170,7 +170,7 @@ func testConcurrentPullMultipleTags(c *testing.T) {
|
||||
dockerCmd(c, args...)
|
||||
|
||||
// Re-pull individual tags, in parallel
|
||||
results := make(chan error)
|
||||
results := make(chan error, len(repos))
|
||||
|
||||
for _, repo := range repos {
|
||||
go func(repo string) {
|
||||
|
||||
Reference in New Issue
Block a user