From 0c6f0227088b993babbbcb3f9e7219a2c33b4305 Mon Sep 17 00:00:00 2001 From: longXboy Date: Thu, 15 Aug 2019 10:37:50 +0800 Subject: [PATCH] fix test for resolver --- pkg/net/rpc/warden/resolver/resolver.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/net/rpc/warden/resolver/resolver.go b/pkg/net/rpc/warden/resolver/resolver.go index a8039a646..4804e148e 100644 --- a/pkg/net/rpc/warden/resolver/resolver.go +++ b/pkg/net/rpc/warden/resolver/resolver.go @@ -128,11 +128,11 @@ func (r *Resolver) updateproc() { return } } - if insMap, ok := r.nr.Fetch(context.Background()); ok { - instances, _ := insMap[r.zone] + if ins, ok := r.nr.Fetch(context.Background()); ok { + instances, _ := ins.Instances[r.zone] res := r.filter(instances) if len(res) == 0 { - for _, value := range insMap { + for _, value := range ins.Instances { instances = append(instances, value...) } res = r.filter(instances)