Skip to content

Commit 64605e4

Browse files
authored
chore: fix test (#6860)
Signed-off-by: zirain <zirain2009@gmail.com>
1 parent 279565a commit 64605e4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

internal/globalratelimit/runner/runner_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,14 @@ func Test_subscribeAndTranslate(t *testing.T) {
233233
diff := ""
234234
if !assert.Eventually(t, func() bool {
235235
rs, err := r.cache.GetSnapshot(ratelimit.InfraName)
236-
require.NoError(t, err)
236+
if err != nil {
237+
t.Logf("failed to get snapshot: %v", err)
238+
return false
239+
}
237240

238241
diff = cmp.Diff(tt.wantRateLimitConfigs, rs.GetResources(resourcev3.RateLimitConfigType), cmpopts.IgnoreUnexported(rlsconfv3.RateLimitConfig{}, rlsconfv3.RateLimitDescriptor{}, rlsconfv3.RateLimitPolicy{}))
239242
return diff == ""
240-
}, time.Second*1, time.Millisecond*20) {
243+
}, time.Second*10, time.Second) {
241244
t.Fatalf("snapshot mismatch (-want +got):\n%s", diff)
242245
}
243246
})

0 commit comments

Comments
 (0)