Skip to content

Commit

Permalink
Merge pull request #10531 from JoeWrightss/patch-3
Browse files Browse the repository at this point in the history
Fix some variable spelling errors
  • Loading branch information
xiang90 authored Mar 12, 2019
2 parents 4478993 + 939b4f8 commit e1ca3b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions clientv3/balancer/grpc1.7-health.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ const (
unknownService = "unknown service grpc.health.v1.Health"
)

// ErrNoAddrAvilable is returned by Get() when the balancer does not have
// ErrNoAddrAvailable is returned by Get() when the balancer does not have
// any active connection to endpoints at the time.
// This error is returned only when opts.BlockingWait is true.
var ErrNoAddrAvilable = status.Error(codes.Unavailable, "there is no address available")
var ErrNoAddrAvailable = status.Error(codes.Unavailable, "there is no address available")

type NotifyMsg int

Expand Down Expand Up @@ -510,7 +510,7 @@ func (b *GRPC17Health) Get(ctx context.Context, opts grpc.BalancerGetOptions) (g
return grpc.Address{Addr: ""}, nil, grpc.ErrClientConnClosing
}
if addr == "" {
return grpc.Address{Addr: ""}, nil, ErrNoAddrAvilable
return grpc.Address{Addr: ""}, nil, ErrNoAddrAvailable
}
return grpc.Address{Addr: addr}, func() {}, nil
}
Expand Down
4 changes: 2 additions & 2 deletions clientv3/balancer/grpc1.7-health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestOldHealthBalancerGetUnblocking(t *testing.T) {
unblockingOpts := grpc.BalancerGetOptions{BlockingWait: false}

_, _, err := hb.Get(context.Background(), unblockingOpts)
if err != ErrNoAddrAvilable {
if err != ErrNoAddrAvailable {
t.Errorf("Get() with no up endpoints should return ErrNoAddrAvailable, got: %v", err)
}

Expand Down Expand Up @@ -69,7 +69,7 @@ func TestOldHealthBalancerGetUnblocking(t *testing.T) {
}
down2(errors.New("error"))
_, _, err = hb.Get(context.Background(), unblockingOpts)
if err != ErrNoAddrAvilable {
if err != ErrNoAddrAvailable {
t.Errorf("Get() with no up endpoints should return ErrNoAddrAvailable, got: %v", err)
}
}
Expand Down

0 comments on commit e1ca3b4

Please sign in to comment.