From: guoguangwu Date: Sat, 9 Mar 2024 03:10:36 +0000 (+0000) Subject: compress/gzip: close writer in test X-Git-Tag: go1.23rc1~924 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a3eb3b8148b5f615f24f9e58451adec3d55b739a;p=gostls13.git 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 --- 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.