From 9155dbfe6b01480f52bf8402c8b40e0c3ba680c0 Mon Sep 17 00:00:00 2001 From: Tony Date: Tue, 5 Nov 2019 23:29:05 +0800 Subject: [PATCH] fix test event --- pkg/naming/zookeeper/zookeeper_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/naming/zookeeper/zookeeper_test.go b/pkg/naming/zookeeper/zookeeper_test.go index 192bc1883..0539d8f2a 100644 --- a/pkg/naming/zookeeper/zookeeper_test.go +++ b/pkg/naming/zookeeper/zookeeper_test.go @@ -28,13 +28,13 @@ func TestZookeeper(t *testing.T) { if err != nil { t.Fatal(err) } - res := zk.Build(_testAppid) - event := res.Watch() _, err = zk.Register(context.TODO(), _testIns) if err != nil { t.Fatal(err) } - <-event + // fetch&watch + res := zk.Build(_testAppid) + event := res.Watch() <-event in, ok := res.Fetch(context.TODO()) if !ok {