Commit 62bddfe3 authored by antirez's avatar antirez
Browse files

Cluser test: write multiple keys in unit 03.

The write-failover-read test is better if we write 100 keys so that we
are sure all the nodes are affected by the write.
parent 1381a6bf
...@@ -68,8 +68,10 @@ while {[incr iterations -1]} { ...@@ -68,8 +68,10 @@ while {[incr iterations -1]} {
} }
test "Cluster is writable" { test "Cluster is writable" {
catch {$cluster set $key $val} err for {set i 0} {$i < 100} {incr i} {
assert {$err eq {OK}} catch {$cluster set $key:$i $val:$i} err
assert {$err eq {OK}}
}
} }
test "Restarting node #$tokill" { test "Restarting node #$tokill" {
...@@ -85,8 +87,10 @@ while {[incr iterations -1]} { ...@@ -85,8 +87,10 @@ while {[incr iterations -1]} {
} }
test "We can read back the value we set before" { test "We can read back the value we set before" {
catch {$cluster get $key} err for {set i 0} {$i < 100} {incr i} {
assert {$err eq $val} catch {$cluster get $key:$i} err
assert {$err eq "$val:$i"}
}
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment