Skip to content

Commit 6efe6e1

Browse files
committed
e2e TCP Close-wait don't set conn deadline
Don't set a connection deadline for reading, because the read operation will fail if no data is reaceived after the deadline, and will not keep the connection in the close_wait status.
1 parent 4b423ad commit 6efe6e1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

test/e2e/network/kube_proxy.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@ var kubeProxyE2eImage = imageutils.GetE2EImage(imageutils.Agnhost)
4444

4545
var _ = SIGDescribe("Network", func() {
4646
const (
47-
testDaemonHTTPPort = 11301
48-
testDaemonTCPPort = 11302
49-
deadlineTimeoutSeconds = 5
50-
postFinTimeoutSeconds = 15
47+
testDaemonHTTPPort = 11301
48+
testDaemonTCPPort = 11302
49+
postFinTimeoutSeconds = 30
5150
)
5251

5352
fr := framework.NewDefaultFramework("network")
@@ -157,7 +156,7 @@ var _ = SIGDescribe("Network", func() {
157156
fmt.Sprintf(`{"RemoteAddr":"%v", "PostFinTimeoutSeconds":%v, "TimeoutSeconds":%v, "LeakConnection":true}`,
158157
net.JoinHostPort(serverNodeInfo.nodeIP, strconv.Itoa(testDaemonTCPPort)),
159158
postFinTimeoutSeconds,
160-
deadlineTimeoutSeconds),
159+
0),
161160
},
162161
},
163162
},
@@ -232,7 +231,7 @@ var _ = SIGDescribe("Network", func() {
232231
cmd := fmt.Sprintf("cat /rootfs/proc/net/nf_conntrack "+
233232
"| grep -m 1 'CLOSE_WAIT.*dst=%v.*dport=%v' ",
234233
ip, testDaemonTCPPort)
235-
if err := wait.PollImmediate(deadlineTimeoutSeconds, postFinTimeoutSeconds, func() (bool, error) {
234+
if err := wait.PollImmediate(1*time.Second, postFinTimeoutSeconds, func() (bool, error) {
236235
result, err := framework.RunHostCmd(fr.Namespace.Name, "e2e-net-exec", cmd)
237236
// retry if we can't obtain the conntrack entry
238237
if err != nil {

0 commit comments

Comments
 (0)