Merge pull request #87052 from oomichi/add-error-handling-issue86678

Add error handling of CloseWrite()
This commit is contained in:
Kubernetes Prow Robot 2020-01-10 00:20:34 -08:00 committed by GitHub
commit e3f90df767
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -321,7 +321,9 @@ func doTestMustConnectSendDisconnect(bindAddress string, f *framework.Framework)
fmt.Fprint(conn, "abc")
ginkgo.By("Closing the write half of the client's connection")
conn.CloseWrite()
if err = conn.CloseWrite(); err != nil {
framework.Failf("Couldn't close the write half of the client's connection: %v", err)
}
ginkgo.By("Reading data from the local port")
fromServer, err := ioutil.ReadAll(conn)