fix TestV2WatchKeyInDir test
parent
44b08fea62
commit
3e4f8a382e
|
@ -204,6 +204,9 @@ func TestV2WatchKeyInDir(t *testing.T) {
|
||||||
c <- true
|
c <- true
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
// wait for expiration, we do have a up to 500 millisecond delay
|
||||||
|
time.Sleep(1500 * time.Millisecond)
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-c:
|
case <-c:
|
||||||
|
|
||||||
|
@ -215,7 +218,6 @@ func TestV2WatchKeyInDir(t *testing.T) {
|
||||||
assert.Equal(t, body["action"], "expire", "")
|
assert.Equal(t, body["action"], "expire", "")
|
||||||
|
|
||||||
node := body["node"].(map[string]interface{})
|
node := body["node"].(map[string]interface{})
|
||||||
assert.Equal(t, node["key"], "/keyindir/bar", "")
|
assert.Equal(t, node["key"], "/keyindir", "")
|
||||||
assert.Equal(t, node["value"], "XXX", "")
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue