1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-10 00:29:01 +02:00

fix test event

This commit is contained in:
Tony 2019-11-05 23:29:05 +08:00
parent 4b11f44419
commit 9155dbfe6b

View File

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