Skip to content

Commit

Permalink
test: fix unconvert errors
Browse files Browse the repository at this point in the history
Fix unconvert errors related to unnecessary type conversions.
  • Loading branch information
spzala committed Apr 25, 2019
1 parent 8dccf5b commit 44a5c80
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion clientv3/concurrency/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func NewSession(client *v3.Client, opts ...SessionOption) (*Session, error) {
if err != nil {
return nil, err
}
id = v3.LeaseID(resp.ID)
id = resp.ID
}

ctx, cancel := context.WithCancel(ops.ctx)
Expand Down
2 changes: 1 addition & 1 deletion clientv3/integration/lease_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TestLeaseRevoke(t *testing.T) {
t.Errorf("failed to create lease %v", err)
}

_, err = lapi.Revoke(context.Background(), clientv3.LeaseID(resp.ID))
_, err = lapi.Revoke(context.Background(), resp.ID)
if err != nil {
t.Errorf("failed to revoke lease %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion clientv3/mirror/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (s *syncer) SyncBase(ctx context.Context) (<-chan clientv3.GetResponse, cha
return
}

respchan <- (clientv3.GetResponse)(*resp)
respchan <- *resp

if !resp.More {
return
Expand Down
2 changes: 1 addition & 1 deletion clientv3/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var (
// client-side streaming retry limit, only applied to requests where server responds with
// a error code clearly indicating it was unable to process the request such as codes.Unavailable.
// If set to 0, retry is disabled.
defaultStreamMaxRetries = uint(^uint(0)) // max uint
defaultStreamMaxRetries = uint(0) // max uint

// client-side retry backoff wait between requests.
defaultBackoffWaitBetween = 25 * time.Millisecond
Expand Down

0 comments on commit 44a5c80

Please sign in to comment.