From cda1b48fe3ee9083a2262f1d6eeb039c66c12b40 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Fri, 8 Mar 2024 16:56:27 +0800 Subject: [PATCH] compress/gzip: close writer in test Signed-off-by: guoguangwu --- src/compress/gzip/gzip_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/compress/gzip/gzip_test.go b/src/compress/gzip/gzip_test.go index 12c8e182078..5aeb2e2675d 100644 --- a/src/compress/gzip/gzip_test.go +++ b/src/compress/gzip/gzip_test.go @@ -200,6 +200,11 @@ func TestWriterFlush(t *testing.T) { if n2 == n3 { t.Fatal("Flush didn't flush any data") } + + if err := w.Close(); err != nil { + t.Fatal(err) + } + } // Multiple gzip files concatenated form a valid gzip file.