]> Cypherpunks repositories - gostls13.git/commitdiff
compress/gzip: close writer in test
authorguoguangwu <guoguangwug@gmail.com>
Sat, 9 Mar 2024 03:10:36 +0000 (03:10 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 11 Mar 2024 17:10:06 +0000 (17:10 +0000)
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 <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/compress/gzip/gzip_test.go

index 12c8e18207893d64ff4dcf4642c126d628721146..5aeb2e2675d5b0292f30d04138d4c3854192f872 100644 (file)
@@ -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.