mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
xfer: fix a simple goroutine leak in unit test
Signed-off-by: Ziheng Liu <lzhfromustc@gmail.com>
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user