Skip to content

Commit

Permalink
fix(test): modify the comparison to function signatures in TestClient…
Browse files Browse the repository at this point in the history
…Options (#1163)
  • Loading branch information
lhpqaq authored Aug 1, 2024
1 parent 9c9cfba commit 9536ec4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/app/client/option_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestClientOptions(t *testing.T) {
retry.WithInitDelay(100*time.Millisecond),
retry.WithMaxDelay(5*time.Second),
retry.WithMaxJitter(1*time.Second),
retry.WithDelayPolicy(retry.CombineDelay(retry.FixedDelayPolicy, retry.BackOffDelayPolicy, retry.RandomDelayPolicy)),
retry.WithDelayPolicy(retry.CombineDelay(retry.DefaultDelayPolicy, retry.FixedDelayPolicy, retry.BackOffDelayPolicy)),
),
WithWriteTimeout(time.Second),
WithConnStateObserve(nil, time.Second),
Expand All @@ -59,4 +59,7 @@ func TestClientOptions(t *testing.T) {
assert.DeepEqual(t, 5*time.Second, opt.RetryConfig.MaxDelay)
assert.DeepEqual(t, 1*time.Second, opt.RetryConfig.MaxJitter)
assert.DeepEqual(t, 1*time.Second, opt.ObservationInterval)
for i := 0; i < 100; i++ {
assert.DeepEqual(t, opt.RetryConfig.DelayPolicy(uint(i), nil, opt.RetryConfig), retry.CombineDelay(retry.DefaultDelayPolicy, retry.FixedDelayPolicy, retry.BackOffDelayPolicy)(uint(i), nil, opt.RetryConfig))
}
}

0 comments on commit 9536ec4

Please sign in to comment.