mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Add error handling of CloseWrite()
The e2e test "Kubectl Port forwarding With a server listening .." is failed sometimes due to the difference between expected data and received data. To receive the data, the test does CloseWrite() but it didn't have the corresponding error handling. This adds it to investigate the issue more.
This commit is contained in:
parent
aef336d712
commit
99b135442c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user