diff --git a/projects/gateway2/proxy_syncer/proxy_syncer.go b/projects/gateway2/proxy_syncer/proxy_syncer.go index 01992ea4ac6..2dc8b1a9b32 100644 --- a/projects/gateway2/proxy_syncer/proxy_syncer.go +++ b/projects/gateway2/proxy_syncer/proxy_syncer.go @@ -353,7 +353,7 @@ func (s *ProxySyncer) Init(ctx context.Context, dbg *krt.DebugHandler) error { ctx, s.istioClient, rlkubev1a1.SchemeGroupVersion.WithResource("ratelimitconfigs"), - krt.WithName("KubeRateLimitConfwithDebug,igs"), + krt.WithName("KubeRateLimitConfigs"), withDebug, ) upstreams := SetupCollectionDynamic[glookubev1.Upstream]( diff --git a/projects/gateway2/setup/ggv2setup_test.go b/projects/gateway2/setup/ggv2setup_test.go index 192d854bc80..ef1bd909907 100644 --- a/projects/gateway2/setup/ggv2setup_test.go +++ b/projects/gateway2/setup/ggv2setup_test.go @@ -294,10 +294,18 @@ func testScenario(t *testing.T, ctx context.Context, client istiokube.CLIClient, } t.Log("applied yamls", t.Name()) // make sure all yamls reached the control plane - time.Sleep(time.Second) + timer := time.NewTimer(10 * time.Second) + defer timer.Stop() dump := getXdsDump(t, ctx, xdsPort, testgwname) - + for len(dump.Listeners) == 0 { + select { + case <-timer.C: + dump = getXdsDump(t, ctx, xdsPort, testgwname) + case <-timer.C: + t.Fatalf("timed out waiting for listeners") + } + } if write { t.Logf("writing out file") // serialize xdsDump to yaml