1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-17 21:07:54 +02:00

fix test for resolver

This commit is contained in:
longXboy 2019-08-15 10:37:50 +08:00
parent 16c346eba4
commit 0c6f022708

View File

@ -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)