mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
clientv3/balancer/grpc1.7-health.go: Fix variable spelling error
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
This commit is contained in:
parent
8c228d692b
commit
939b4f8599
@ -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
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user