This commit is contained in:
Amaury Chamayou 2024-01-18 14:30:13 +00:00 коммит произвёл GitHub
Родитель 0237ccb5cf
Коммит 4d6f8e2dfa
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 0 добавлений и 71 удалений

Просмотреть файл

@ -1,71 +0,0 @@
## Create a single node, have it become leader/primary, and receive
## a write with value HelloTerm1.
nodes,0
periodic_one,0,500
dispatch_all
assert_is_primary,0
state_all
replicate,1,HelloTerm1
emit_signature,1
periodic_all,500
dispatch_all
## create_new_node should create a node in pending state,
## i.e., no connection with other nodes and not part of
## any configuration.
create_new_node,1
periodic_all,500
dispatch_all
## Both are primary at this point because the nodes
## have not connected, and, thus, do not know each other.
assert_is_primary,0
## Node 0 has committed the write with HelloTerm1. Node
## 1 has *not* seen the write.
assert_commit_idx,0,2
assert_commit_idx,1,0
state_all
## Without connecting node 0 and 1, change the configuration
## in term 1 to node 1.
replicate_new_configuration,1,1
emit_signature,1
periodic_all,500
dispatch_all
## Node 0 is a retired leader.
assert_is_retired,0
assert_is_primary,0
assert_commit_idx,0,2
## Node 1 is a follower/backup.
state_all
#assert_is_candidate,1
assert_commit_idx,1,0
connect,0,1
periodic_all,1000
dispatch_all
## Node 0 remains a retired leader.
assert_is_retired,0
assert_is_primary,0
assert_commit_idx,0,2
assert_commit_idx,1,0
assert_is_backup,1
state_all
periodic_all,1000
dispatch_all
state_all
assert_is_primary,1
assert_commit_idx,1,4