From a3eb3b8148b5f615f24f9e58451adec3d55b739a Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Sat, 9 Mar 2024 03:10:36 +0000 Subject: [PATCH] compress/gzip: close writer in test Change-Id: I12bc9287106f1492cbc9e74b4163cce97c957d31 GitHub-Last-Rev: cda1b48fe3ee9083a2262f1d6eeb039c66c12b40 GitHub-Pull-Request: golang/go#66185 Reviewed-on: https://go-review.googlesource.com/c/go/+/569896 Reviewed-by: Cherry Mui Reviewed-by: Ian Lance Taylor Reviewed-by: Joseph Tsai Auto-Submit: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI --- 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 12c8e18207..5aeb2e2675 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. -- 2.48.1