Page MenuHomeClusterLabs Projects

No OneTemporary

diff --git a/unit-tests/001_init-catchup.txt b/unit-tests/001_init-catchup.txt
deleted file mode 100644
index 1cdc308..0000000
--- a/unit-tests/001_init-catchup.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-# vim: ft=sh et :
-
-
-ticket:
- state ST_INIT
- last_ack_ballot 1
- new_ballot 2012
-
-# No message0
-# expecting catchup query
-
-# outgoing packet: expect this data
-outgoing0:
- header.cmd CMD_CATCHUP
- header.result RLT_SUCCESS
-
-
-# should be accepted
-message2: # valid CMR_CATCHUP
- header.cmd CMR_CATCHUP
- header.result RLT_SUCCESS
- header.from booth_conf->site[2].site_id
- ticket.ballot 2062
- ticket.prev_ballot 2052
- ticket.owner -1
-
-# nothing goes out
-
-
-# after a delay, check final state
-finally:
-# should be overwritten
- last_ack_ballot 2052
- new_ballot 2062
diff --git a/unit-tests/001_init-get-heartbeat.txt b/unit-tests/001_init-get-heartbeat.txt
new file mode 100644
index 0000000..fa79a06
--- /dev/null
+++ b/unit-tests/001_init-get-heartbeat.txt
@@ -0,0 +1,25 @@
+# vim: ft=sh et :
+
+
+ticket:
+ state ST_FOLLOWER
+ current_term 1
+ leader 0
+
+# should be accepted
+message0: # valid heartbeat
+ header.cmd OP_HEARTBEAT
+ header.result RLT_SUCCESS
+ header.from booth_conf->site[2].site_id
+ ticket.leader booth_conf->site[2].site_id
+ ticket.term_valid_for 3
+ ticket.term 20
+
+# nothing goes out
+
+
+# after a delay, check final state
+finally:
+# should be overwritten
+ current_term 20
+ leader booth_conf->site+2

File Metadata

Mime Type
text/x-diff
Expires
Mon, Feb 24, 5:13 PM (2 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1464359
Default Alt Text
(1 KB)

Event Timeline