mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #43132 from lzhfromustc/patch_1_7
test: fix a simple goroutine leak in distribution/xfer
This commit is contained in:
commit
eddbd6ff1e
1 changed files with 1 additions and 0 deletions
|
@ -350,6 +350,7 @@ func TestCancelledDownload(t *testing.T) {
|
||||||
descriptors := downloadDescriptors(nil)
|
descriptors := downloadDescriptors(nil)
|
||||||
_, _, err := ldm.Download(ctx, *image.NewRootFS(), runtime.GOOS, descriptors, progress.ChanOutput(progressChan))
|
_, _, err := ldm.Download(ctx, *image.NewRootFS(), runtime.GOOS, descriptors, progress.ChanOutput(progressChan))
|
||||||
if err != context.Canceled {
|
if err != context.Canceled {
|
||||||
|
close(progressChan)
|
||||||
t.Fatal("expected download to be cancelled")
|
t.Fatal("expected download to be cancelled")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue