fix test event

pull/412/head
Tony 5 years ago
parent 4b11f44419
commit 9155dbfe6b
  1. 6
      pkg/naming/zookeeper/zookeeper_test.go

@ -28,13 +28,13 @@ func TestZookeeper(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
res := zk.Build(_testAppid)
event := res.Watch()
_, err = zk.Register(context.TODO(), _testIns) _, err = zk.Register(context.TODO(), _testIns)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
<-event // fetch&watch
res := zk.Build(_testAppid)
event := res.Watch()
<-event <-event
in, ok := res.Fetch(context.TODO()) in, ok := res.Fetch(context.TODO())
if !ok { if !ok {

Loading…
Cancel
Save