Skip to content

Commit 1911ca2

Browse files
authored
Merge pull request kubernetes#91045 from saschagrunert/port-forward-deflake
Deflake port-forward e2e test
2 parents d4ce66f + c7648f5 commit 1911ca2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/e2e/kubectl/portforward.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,6 @@ func doTestMustConnectSendDisconnect(bindAddress string, f *framework.Framework)
322322
ginkgo.By("Sending the expected data to the local port")
323323
fmt.Fprint(conn, "abc")
324324

325-
ginkgo.By("Closing the write half of the client's connection")
326-
if err = conn.CloseWrite(); err != nil {
327-
framework.Failf("Couldn't close the write half of the client's connection: %v", err)
328-
}
329-
330325
ginkgo.By("Reading data from the local port")
331326
fromServer, err := ioutil.ReadAll(conn)
332327
if err != nil {
@@ -343,6 +338,11 @@ func doTestMustConnectSendDisconnect(bindAddress string, f *framework.Framework)
343338
framework.Failf("Expected %q from server, got %q", e, a)
344339
}
345340

341+
ginkgo.By("Closing the write half of the client's connection")
342+
if err = conn.CloseWrite(); err != nil {
343+
framework.Failf("Couldn't close the write half of the client's connection: %v", err)
344+
}
345+
346346
ginkgo.By("Waiting for the target pod to stop running")
347347
if err := WaitForTerminatedContainer(f, pod, "portforwardtester"); err != nil {
348348
framework.Failf("Container did not terminate: %v", err)

0 commit comments

Comments
 (0)