@@ -290,7 +290,8 @@ func skipGatewayIfNonCloudPlatform(oc *exutil.CLI) {
290
290
291
291
func waitForIstioHealthy (oc * exutil.CLI ) {
292
292
resource := types.NamespacedName {Namespace : "openshift-ingress" , Name : "openshift-gateway" }
293
- err := wait .PollUntilContextTimeout (context .Background (), 1 * time .Second , 10 * time .Minute , false , func (context context.Context ) (bool , error ) {
293
+ timeout := 20 * time .Minute
294
+ err := wait .PollUntilContextTimeout (context .Background (), 10 * time .Second , timeout , false , func (context context.Context ) (bool , error ) {
294
295
istioStatus , errIstio := oc .AsAdmin ().Run ("get" ).Args ("-n" , resource .Namespace , "istio" , resource .Name , "-o=jsonpath={.status.state}" ).Output ()
295
296
if errIstio != nil && strings .Contains (errIstio .Error (), `the server doesn't have a resource type "istio"` ) {
296
297
e2e .Logf ("Istio CRD does not exist; retrying..." )
@@ -308,11 +309,12 @@ func waitForIstioHealthy(oc *exutil.CLI) {
308
309
e2e .Logf ("Istio CR %q is healthy" , resource .Name )
309
310
return true , nil
310
311
})
311
- o .Expect (err ).NotTo (o .HaveOccurred (), "Istio CR %q did not reach healthy state in time " , resource .Name )
312
+ o .Expect (err ).NotTo (o .HaveOccurred (), "Istio CR %q did not reach healthy state within %v " , resource .Name , timeout )
312
313
}
313
314
314
315
func checkGatewayClass (oc * exutil.CLI , name string ) error {
315
- waitErr := wait .PollUntilContextTimeout (context .Background (), 2 * time .Second , 10 * time .Minute , false , func (context context.Context ) (bool , error ) {
316
+ timeout := 20 * time .Minute
317
+ waitErr := wait .PollUntilContextTimeout (context .Background (), 10 * time .Second , timeout , false , func (context context.Context ) (bool , error ) {
316
318
gwc , err := oc .AdminGatewayApiClient ().GatewayV1 ().GatewayClasses ().Get (context , name , metav1.GetOptions {})
317
319
if err != nil {
318
320
e2e .Logf ("Failed to get gatewayclass %s: %v; retrying..." , name , err )
@@ -329,7 +331,7 @@ func checkGatewayClass(oc *exutil.CLI, name string) error {
329
331
return false , nil
330
332
})
331
333
332
- o .Expect (waitErr ).NotTo (o .HaveOccurred (), "Gatewayclass %s is not accepted" , name )
334
+ o .Expect (waitErr ).NotTo (o .HaveOccurred (), "GatewayClass %q was not accepted within %v " , name , timeout )
333
335
return nil
334
336
}
335
337
@@ -362,7 +364,8 @@ func createAndCheckGateway(oc *exutil.CLI, gwname, gwclassname, domain string) (
362
364
363
365
func checkGatewayStatus (oc * exutil.CLI , gwname , ingressNameSpace string ) (* gatewayapiv1.Gateway , error ) {
364
366
programmedGateway := & gatewayapiv1.Gateway {}
365
- if err := wait .PollUntilContextTimeout (context .Background (), 2 * time .Second , 10 * time .Minute , false , func (context context.Context ) (bool , error ) {
367
+ timeout := 20 * time .Minute
368
+ if err := wait .PollUntilContextTimeout (context .Background (), 10 * time .Second , timeout , false , func (context context.Context ) (bool , error ) {
366
369
gateway , err := oc .AdminGatewayApiClient ().GatewayV1 ().Gateways (ingressNameSpace ).Get (context , gwname , metav1.GetOptions {})
367
370
if err != nil {
368
371
e2e .Logf ("Failed to get gateway %q: %v, retrying..." , gwname , err )
@@ -381,7 +384,7 @@ func checkGatewayStatus(oc *exutil.CLI, gwname, ingressNameSpace string) (*gatew
381
384
e2e .Logf ("Found gateway %q but the controller is still not programmed, retrying..." , gwname )
382
385
return false , nil
383
386
}); err != nil {
384
- return nil , fmt .Errorf ("timed out waiting for gateway %q to become programmed: %w" , gwname , err )
387
+ return nil , fmt .Errorf ("timed out after %v waiting for gateway %q to become programmed: %w" , timeout , gwname , err )
385
388
}
386
389
e2e .Logf ("Gateway %q successfully programmed!" , gwname )
387
390
return programmedGateway , nil
0 commit comments