fix test for resolver

pull/266/head
longXboy 5 years ago
parent 16c346eba4
commit 0c6f022708
  1. 6
      pkg/net/rpc/warden/resolver/resolver.go

@ -128,11 +128,11 @@ func (r *Resolver) updateproc() {
return return
} }
} }
if insMap, ok := r.nr.Fetch(context.Background()); ok { if ins, ok := r.nr.Fetch(context.Background()); ok {
instances, _ := insMap[r.zone] instances, _ := ins.Instances[r.zone]
res := r.filter(instances) res := r.filter(instances)
if len(res) == 0 { if len(res) == 0 {
for _, value := range insMap { for _, value := range ins.Instances {
instances = append(instances, value...) instances = append(instances, value...)
} }
res = r.filter(instances) res = r.filter(instances)

Loading…
Cancel
Save