Add extended test scaffold for Basic Raft Cluster

This commit is contained in:
Raycho Mukelov 2023-09-01 02:14:45 +03:00
parent 8ac52c2dd8
commit 497b309379
2 changed files with 17 additions and 1 deletions

3
all_test.md Normal file
View File

@ -0,0 +1,3 @@
* testbasictimers - 503 milliseconds, 739 microseconds, and 790 nanoseconds
* testbasicstatemachine - 1 millisecond, 551 microseconds, and 593 nanoseconds
* testbasiccluster - 1 millisecond, 333 microseconds, and 100 nanoseconds

View File

@ -17,11 +17,24 @@ proc basicClusterMain*() =
suite "Basic Raft Cluster Tests": suite "Basic Raft Cluster Tests":
test "Test Basic Raft Cluster Init (5 nodes)": test "Basic Raft Cluster Init (5 nodes)":
for i in 0..4: for i in 0..4:
nodesIds[i] = genUUID() nodesIds[i] = genUUID()
cluster = BasicRaftClusterInit(nodesIds) cluster = BasicRaftClusterInit(nodesIds)
check cluster.nodes.len == 5
test "Generate Random Client SmCommands Queue":
discard
test "Start Basic Raft Cluster And wait it to converge (Elect a Leader)":
discard
test "Simulate Basic Raft Cluster Client SmCommands Execution / Log Replication":
discard
test "Evaluate results":
discard
if isMainModule: if isMainModule:
basicClusterMain() basicClusterMain()