diff --git a/clientv3/balancer_test.go b/clientv3/balancer_test.go index 5009d94eb..fd3cfed0d 100644 --- a/clientv3/balancer_test.go +++ b/clientv3/balancer_test.go @@ -29,6 +29,7 @@ var ( func TestBalancerGetUnblocking(t *testing.T) { sb := newSimpleBalancer(endpoints) + defer sb.Close() if addrs := <-sb.Notify(); len(addrs) != len(endpoints) { t.Errorf("Initialize newSimpleBalancer should have triggered Notify() chan, but it didn't") } @@ -72,6 +73,7 @@ func TestBalancerGetUnblocking(t *testing.T) { func TestBalancerGetBlocking(t *testing.T) { sb := newSimpleBalancer(endpoints) + defer sb.Close() if addrs := <-sb.Notify(); len(addrs) != len(endpoints) { t.Errorf("Initialize newSimpleBalancer should have triggered Notify() chan, but it didn't") }