Skip to content

Commit 7236c98

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 8d77506 commit 7236c98

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
@@ -755,8 +755,9 @@ func assertGatewaySuccessful(t *testing.T, namespace, name string) (*gatewayapiv
755755

756756
// Wait for the gateway to be accepted and programmed.
757757
// Load balancer provisioning can take several minutes on some platforms.
758-
// Therefore, a timeout of 3 minutes is set to accommodate potential delays.
759-
err := wait.PollUntilContextTimeout(context.Background(), 3*time.Second, 3*time.Minute, false, func(context context.Context) (bool, error) {
758+
// CCM leader election can also be slow - up to 8 minutes has been observed.
759+
// Therefore, a timeout of 10 minutes is set to accommodate potential delays.
760+
err := wait.PollUntilContextTimeout(context.Background(), 5*time.Second, 10*time.Minute, false, func(context context.Context) (bool, error) {
760761
if err := kclient.Get(context, nsName, gw); err != nil {
761762
t.Logf("Failed to get gateway %v: %v; retrying...", nsName, err)
762763
return false, nil
@@ -794,7 +795,7 @@ func assertGatewaySuccessful(t *testing.T, namespace, name string) (*gatewayapiv
794795
t.Logf("Failed to get gateway service %v: %v; retrying...", svcNsName, err)
795796
return false, nil
796797
}
797-
t.Logf("[%s] Found gateway service: %+v", time.Now().Format(time.DateTime), svc)
798+
t.Logf("[%s] Found gateway service with status: %+v", time.Now().Format(time.DateTime), svc.Status)
798799
return false, nil
799800
})
800801
if err != nil {

0 commit comments

Comments
 (0)