mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: add single_node InteractionEnv test case
Show-cases the current behavior and changes made in future commits for [^1]. The test demonstrates that a single-voter raft instance will emit an entry as committed while it still needs to be appended to the log. [^1]: https://github.com/etcd-io/etcd/issues/14370 Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
This commit is contained in:
parent
5e3314da42
commit
21be9fa337
27
raft/testdata/single_node.txt
vendored
Normal file
27
raft/testdata/single_node.txt
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
log-level info
|
||||||
|
----
|
||||||
|
ok
|
||||||
|
|
||||||
|
add-nodes 1 voters=(1) index=3
|
||||||
|
----
|
||||||
|
INFO 1 switched to configuration voters=(1)
|
||||||
|
INFO 1 became follower at term 0
|
||||||
|
INFO newRaft 1 [peers: [1], term: 0, commit: 3, applied: 3, lastindex: 3, lastterm: 1]
|
||||||
|
|
||||||
|
campaign 1
|
||||||
|
----
|
||||||
|
INFO 1 is starting a new election at term 0
|
||||||
|
INFO 1 became candidate at term 1
|
||||||
|
INFO 1 received MsgVoteResp from 1 at term 1
|
||||||
|
INFO 1 became leader at term 1
|
||||||
|
|
||||||
|
stabilize
|
||||||
|
----
|
||||||
|
> 1 handling Ready
|
||||||
|
Ready MustSync=true:
|
||||||
|
Lead:1 State:StateLeader
|
||||||
|
HardState Term:1 Vote:1 Commit:4
|
||||||
|
Entries:
|
||||||
|
1/4 EntryNormal ""
|
||||||
|
CommittedEntries:
|
||||||
|
1/4 EntryNormal ""
|
Loading…
x
Reference in New Issue
Block a user