Skip to content
Snippets Groups Projects
Commit 906d9165 authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon:
Browse files

refactor: display ConfChangeType as is

parent b7833dc5
No related branches found
No related tags found
1 merge request!356refactor: display ConfChangeType as is
Pipeline #13463 passed
...@@ -676,9 +676,9 @@ impl<'a> std::fmt::Display for EntryPayload<'a> { ...@@ -676,9 +676,9 @@ impl<'a> std::fmt::Display for EntryPayload<'a> {
const fn change_type(ct: raft::ConfChangeType) -> &'static str { const fn change_type(ct: raft::ConfChangeType) -> &'static str {
match ct { match ct {
raft::ConfChangeType::AddNode => "Promote", raft::ConfChangeType::AddNode => "AddNode",
raft::ConfChangeType::AddLearnerNode => "Demote", raft::ConfChangeType::AddLearnerNode => "AddLearnerNode",
raft::ConfChangeType::RemoveNode => "Remove", raft::ConfChangeType::RemoveNode => "RemoveNode",
} }
} }
} }
......
...@@ -220,7 +220,7 @@ def test_raft_log(instance: Instance): ...@@ -220,7 +220,7 @@ def test_raft_log(instance: Instance):
| 1 | 1 |1.0.1|PersistPeer(i1, 1, r1, 127.0.0.1:{p}, Offline(0), 1, {b})| | 1 | 1 |1.0.1|PersistPeer(i1, 1, r1, 127.0.0.1:{p}, Offline(0), 1, {b})|
| 2 | 1 |1.0.2|Insert(cluster_state, ["replication_factor",1])| | 2 | 1 |1.0.2|Insert(cluster_state, ["replication_factor",1])|
| 3 | 1 |1.0.3|Insert(cluster_state, ["desired_schema_version",0])| | 3 | 1 |1.0.3|Insert(cluster_state, ["desired_schema_version",0])|
| 4 | 1 | |Promote(1)| | 4 | 1 | |AddNode(1)|
| 5 | 2 | |-| | 5 | 2 | |-|
| 6 | 2 |1.1.2|PersistPeer(i1, 1, r1, 127.0.0.1:{p}, Offline(0) -> Online(1), 6, {b})| | 6 | 2 |1.1.2|PersistPeer(i1, 1, r1, 127.0.0.1:{p}, Offline(0) -> Online(1), 6, {b})|
| 7 | 2 |1.1.3|PersistPeer(i1, 1, r1, 127.0.0.1:{p}, RaftSynced(1) -> Online(1), 7, {b})| | 7 | 2 |1.1.3|PersistPeer(i1, 1, r1, 127.0.0.1:{p}, RaftSynced(1) -> Online(1), 7, {b})|
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment