Skip to content

Commit 1184e8e

Browse files
committed
[NO-ISSUE] Set tls proxy dialer timeout to 3 seconds
The tls proxy dialer timeout reduce the proxy setup time because the fisrt connection usually fails and TCP timeouts are often around 3 mins
1 parent e4ee903 commit 1184e8e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

controllers/suite_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,11 @@ func setUpTestProxy() {
374374

375375
if os.Getenv("USE_EXISTING_CLUSTER") == "true" {
376376
Eventually(func(g Gomega) {
377-
tlsConn, tlsErr := tls.Dial("tcp", clusterIngressHost+":443",
377+
tlsDialer := new(net.Dialer)
378+
// The tls proxy dialer timeout reduce the proxy setup time because the
379+
// fisrt connection usually fails and TCP timeouts are often around 3 mins
380+
tlsDialer.Timeout = 3 * time.Second
381+
tlsConn, tlsErr := tls.DialWithDialer(tlsDialer, "tcp", clusterIngressHost+":443",
378382
&tls.Config{ServerName: testProxyHost, InsecureSkipVerify: true})
379383
g.Expect(tlsErr).Should(BeNil())
380384
tlsConn.Close()

0 commit comments

Comments
 (0)