Skip to content

Commit 03c72b7

Browse files
committed
e2e: Increase timeout for assertGatewaySuccessful to 10m
CCM leader election can take several minutes, delaying LB provisioning. In some clusters, leader election has been observed to take up to 8m. To accommodate this, increase the timeout for `assertGatewaySuccessful` to 10m.
1 parent 60b4508 commit 03c72b7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/e2e/util_gatewayapi_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,9 @@ func assertGatewaySuccessful(t *testing.T, namespace, name string) (*gatewayapiv
749749

750750
// Wait for the gateway to be accepted and programmed.
751751
// Load balancer provisioning can take several minutes on some platforms.
752-
// Therefore, a timeout of 3 minutes is set to accommodate potential delays.
753-
err := wait.PollUntilContextTimeout(context.Background(), 3*time.Second, 3*time.Minute, false, func(context context.Context) (bool, error) {
752+
// CCM leader election can also be slow - up to 8 minutes has been observed.
753+
// Therefore, a timeout of 10 minutes is set to accommodate potential delays.
754+
err := wait.PollUntilContextTimeout(context.Background(), 5*time.Second, 10*time.Minute, false, func(context context.Context) (bool, error) {
754755
if err := kclient.Get(context, nsName, gw); err != nil {
755756
t.Logf("Failed to get gateway %v: %v; retrying...", nsName, err)
756757
return false, nil
@@ -788,7 +789,7 @@ func assertGatewaySuccessful(t *testing.T, namespace, name string) (*gatewayapiv
788789
t.Logf("Failed to get gateway service %v: %v; retrying...", svcNsName, err)
789790
return false, nil
790791
}
791-
t.Logf("[%s] Found gateway service: %+v", time.Now().Format(time.DateTime), svc)
792+
t.Logf("[%s] Found gateway service with status: %+v", time.Now().Format(time.DateTime), svc.Status)
792793
return false, nil
793794
})
794795
if err != nil {

0 commit comments

Comments
 (0)