raft/rafttest: fix stabilize handler

It was bailing out too early.
This commit is contained in:
Tobias Schottdorf 2019-08-14 17:24:14 +02:00
parent d047fe84ee
commit c2d9514370
2 changed files with 19 additions and 4 deletions

View File

@ -73,9 +73,9 @@ func (env *InteractionEnv) Stabilize(idxs ...int) error {
withIndent(func() { env.DeliverMsgs(msgs) })
done = false
}
if done {
return nil
}
}
if done {
return nil
}
}
}

View File

@ -136,6 +136,21 @@ status 1
2: StateReplicate match=11 next=12
3: StateReplicate match=11 next=12
# Let things settle.
stabilize
----
ok
> delivering messages
1->2 MsgHeartbeat Term:1 Log:0/0 Commit:11
> delivering messages
1->3 MsgApp Term:1 Log:1/11 Commit:11
> 2 handling Ready
Ready MustSync=false:
Messages:
2->1 MsgHeartbeatResp Term:1 Log:0/0
> 3 handling Ready
Ready MustSync=false:
Messages:
3->1 MsgAppResp Term:1 Log:0/11
> delivering messages
2->1 MsgHeartbeatResp Term:1 Log:0/0
3->1 MsgAppResp Term:1 Log:0/11