fix TestV2WatchKeyInDir test

release-0.4
Xiang Li 2013-12-11 10:19:16 -08:00
parent 44b08fea62
commit 3e4f8a382e
1 changed files with 4 additions and 2 deletions

View File

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