Skip to content

Commit

Permalink
Make vet happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
easwars committed Sep 30, 2019
1 parent 0f7db76 commit 0115f00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions clientconn_test.go
Expand Up @@ -663,15 +663,15 @@ func (s) TestWithBackoffConfig(t *testing.T) {
b := BackoffConfig{MaxDelay: DefaultBackoffConfig.MaxDelay / 2}
bc := grpcbackoff.DefaultConfig
bc.MaxDelay = b.MaxDelay
wantBackoff := backoff.Exponential{bc}
wantBackoff := backoff.Exponential{Config: bc}
testBackoffConfigSet(t, wantBackoff, WithBackoffConfig(b))
}

func (s) TestWithBackoffMaxDelay(t *testing.T) {
md := DefaultBackoffConfig.MaxDelay / 2
bc := grpcbackoff.DefaultConfig
bc.MaxDelay = md
wantBackoff := backoff.Exponential{bc}
wantBackoff := backoff.Exponential{Config: bc}
testBackoffConfigSet(t, wantBackoff, WithBackoffMaxDelay(md))
}

Expand All @@ -684,7 +684,7 @@ func (s) TestWithConnectParams(t *testing.T) {
crt := ConnectParams{Backoff: bc}
// MaxDelay is not set in the ConnectParams. So it should not be set on
// backoff.Exponential as well.
wantBackoff := backoff.Exponential{bc}
wantBackoff := backoff.Exponential{Config: bc}
testBackoffConfigSet(t, wantBackoff, WithConnectParams(crt))
}

Expand Down
4 changes: 2 additions & 2 deletions dialoptions.go
Expand Up @@ -252,7 +252,7 @@ func WithServiceConfig(c <-chan ServiceConfig) DialOption {
// This API is EXPERIMENTAL.
func WithConnectParams(p ConnectParams) DialOption {
return newFuncDialOption(func(o *dialOptions) {
o.bs = backoff.Exponential{p.Backoff}
o.bs = backoff.Exponential{Config: p.Backoff}
o.minConnectTimeout = func() time.Duration {
return p.MinConnectTimeout
}
Expand All @@ -274,7 +274,7 @@ func WithBackoffMaxDelay(md time.Duration) DialOption {
func WithBackoffConfig(b BackoffConfig) DialOption {
bc := grpcbackoff.DefaultConfig
bc.MaxDelay = b.MaxDelay
return withBackoff(backoff.Exponential{bc})
return withBackoff(backoff.Exponential{Config: bc})
}

// withBackoff sets the backoff strategy used for connectRetryNum after a failed
Expand Down

0 comments on commit 0115f00

Please sign in to comment.