mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
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:
parent
01322cd243
commit
2b0936271c
@ -351,6 +351,7 @@ func TestSingleNodeRecovery(t *testing.T) {
|
|||||||
c.DataDir = dataDir
|
c.DataDir = dataDir
|
||||||
e, h, _ = buildServer(t, c, id)
|
e, h, _ = buildServer(t, c, id)
|
||||||
|
|
||||||
|
waitLeader([]*Server{e})
|
||||||
w, err = e.p.Watch(key, false, false, ev.Index())
|
w, err = e.p.Watch(key, false, false, ev.Index())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user