]> Cypherpunks repositories - gostls13.git/commitdiff
io: close PipeReader in test
authorguoguangwu <guoguangwug@gmail.com>
Mon, 11 Mar 2024 11:09:50 +0000 (11:09 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 11 Mar 2024 19:49:15 +0000 (19:49 +0000)
Change-Id: I33858efc00dff02432f28f1e5a94aeea261a5bad
GitHub-Last-Rev: 98861f8d6e187a03330a0947ff651826024fcad2
GitHub-Pull-Request: golang/go#66230
Reviewed-on: https://go-review.googlesource.com/c/go/+/570357
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/io/pipe_test.go

index 8973360740181ba0579e966d840c2f4d10c18f9a..c5fa017fa598c3b199c24b4bcafc05e731eb1710 100644 (file)
@@ -286,7 +286,7 @@ func TestWriteNil(t *testing.T) {
 
 func TestWriteAfterWriterClose(t *testing.T) {
        r, w := Pipe()
-
+       defer r.Close()
        done := make(chan bool)
        var writeErr error
        go func() {