server: fix 2nd watch timeout in TestSingleNodeRecovery

When recovering from data dir, the node needs election timeout to
elect itself to be the leader.
This commit is contained in:
Yicheng Qin 2014-07-28 22:29:00 -07:00
parent 01322cd243
commit 2b0936271c

View File

@ -351,6 +351,7 @@ func TestSingleNodeRecovery(t *testing.T) {
c.DataDir = dataDir
e, h, _ = buildServer(t, c, id)
waitLeader([]*Server{e})
w, err = e.p.Watch(key, false, false, ev.Index())
if err != nil {
t.Fatal(err)