mirror of
https://github.com/fluencelabs/redis
synced 2025-03-21 01:50:50 +00:00
Cluster test: check that every node has a different ID.
This commit is contained in:
parent
e1b129811a
commit
2555b2f4bd
@ -8,9 +8,23 @@ if {$::simulate_error} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
test "Cluster nodes are reachable." {
|
test "Cluster nodes are reachable" {
|
||||||
foreach_redis_id id {
|
foreach_redis_id id {
|
||||||
# Every node should just know itself.
|
# Every node should just know itself.
|
||||||
assert {[R $id ping] eq {PONG}}
|
assert {[R $id ping] eq {PONG}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test "Different nodes have different IDs" {
|
||||||
|
set ids {}
|
||||||
|
set numnodes 0
|
||||||
|
foreach_redis_id id {
|
||||||
|
incr numnodes
|
||||||
|
# Every node should just know itself.
|
||||||
|
set nodeid [dict get [get_myself $id] id]
|
||||||
|
assert {$nodeid ne {}}
|
||||||
|
lappend ids $nodeid
|
||||||
|
}
|
||||||
|
set numids [llength [lsort -unique $ids]]
|
||||||
|
assert {$numids == $numnodes}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user