Skip to content

Commit e3f90df

Browse files
authored
Merge pull request kubernetes#87052 from oomichi/add-error-handling-issue86678
Add error handling of CloseWrite()
2 parents 9269b5d + 99b1354 commit e3f90df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/e2e/kubectl/portforward.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,9 @@ func doTestMustConnectSendDisconnect(bindAddress string, f *framework.Framework)
321321
fmt.Fprint(conn, "abc")
322322

323323
ginkgo.By("Closing the write half of the client's connection")
324-
conn.CloseWrite()
324+
if err = conn.CloseWrite(); err != nil {
325+
framework.Failf("Couldn't close the write half of the client's connection: %v", err)
326+
}
325327

326328
ginkgo.By("Reading data from the local port")
327329
fromServer, err := ioutil.ReadAll(conn)

0 commit comments

Comments
 (0)