Merge pull request #43132 from lzhfromustc/patch_1_7

test: fix a simple goroutine leak in distribution/xfer
This commit is contained in:
Sebastiaan van Stijn 2022-01-21 14:10:47 +01:00 committed by GitHub
commit eddbd6ff1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -350,6 +350,7 @@ func TestCancelledDownload(t *testing.T) {
descriptors := downloadDescriptors(nil)
_, _, err := ldm.Download(ctx, *image.NewRootFS(), runtime.GOOS, descriptors, progress.ChanOutput(progressChan))
if err != context.Canceled {
close(progressChan)
t.Fatal("expected download to be cancelled")
}