mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix TestV2WatchKeyInDir test
This commit is contained in:
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…
x
Reference in New Issue
Block a user