mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Merge pull request #91045 from saschagrunert/port-forward-deflake
Deflake port-forward e2e test
This commit is contained in:
commit
1911ca213f
@ -322,11 +322,6 @@ func doTestMustConnectSendDisconnect(bindAddress string, f *framework.Framework)
|
|||||||
ginkgo.By("Sending the expected data to the local port")
|
ginkgo.By("Sending the expected data to the local port")
|
||||||
fmt.Fprint(conn, "abc")
|
fmt.Fprint(conn, "abc")
|
||||||
|
|
||||||
ginkgo.By("Closing the write half of the client's connection")
|
|
||||||
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")
|
ginkgo.By("Reading data from the local port")
|
||||||
fromServer, err := ioutil.ReadAll(conn)
|
fromServer, err := ioutil.ReadAll(conn)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -343,6 +338,11 @@ func doTestMustConnectSendDisconnect(bindAddress string, f *framework.Framework)
|
|||||||
framework.Failf("Expected %q from server, got %q", e, a)
|
framework.Failf("Expected %q from server, got %q", e, a)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ginkgo.By("Closing the write half of the client's connection")
|
||||||
|
if err = conn.CloseWrite(); err != nil {
|
||||||
|
framework.Failf("Couldn't close the write half of the client's connection: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
ginkgo.By("Waiting for the target pod to stop running")
|
ginkgo.By("Waiting for the target pod to stop running")
|
||||||
if err := WaitForTerminatedContainer(f, pod, "portforwardtester"); err != nil {
|
if err := WaitForTerminatedContainer(f, pod, "portforwardtester"); err != nil {
|
||||||
framework.Failf("Container did not terminate: %v", err)
|
framework.Failf("Container did not terminate: %v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user