Skip to content

Commit

Permalink
fix: testGatewayClassWithParamRef e2e test flaky (#2114)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunzhuo authored Oct 30, 2023
1 parent ef5e450 commit 4047268
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions internal/provider/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,19 @@ func testGatewayClassWithParamRef(ctx context.Context, t *testing.T, provider *P
}, defaultWait, defaultTick)

// Ensure the resource map contains the EnvoyProxy.
res, ok := resources.GatewayAPIResources.Load(gc.Name)
assert.Equal(t, ok, true)
assert.Equal(t, res.EnvoyProxy.Spec, ep.Spec)
require.Eventually(t, func() bool {
res, ok := resources.GatewayAPIResources.Load(gc.Name)
if !ok {
return false
}

if res.EnvoyProxy != nil {
assert.Equal(t, res.EnvoyProxy.Spec, ep.Spec)
return true
}

return false
}, defaultWait, defaultTick)
}

func testGatewayScheduledStatus(ctx context.Context, t *testing.T, provider *Provider, resources *message.ProviderResources) {
Expand Down

0 comments on commit 4047268

Please sign in to comment.