mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 08:30:51 +00:00
Test: cluster/base, check that we can write/read from cluster.
This commit is contained in:
parent
3bc119c155
commit
1c130c6b03
@ -5,6 +5,7 @@
|
||||
cd tests/cluster
|
||||
source cluster.tcl
|
||||
source ../instances.tcl
|
||||
source ../../support/cluster.tcl ; # Redis Cluster client.
|
||||
|
||||
set ::instances_count 20 ; # How many instances we use at max.
|
||||
|
||||
|
@ -94,3 +94,15 @@ test "Nodes should report cluster_state is ok now" {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
test "It is possible to write and read from the cluster" {
|
||||
set port [get_instance_attrib redis 0 port]
|
||||
set cluster [redis_cluster 127.0.0.1:$port]
|
||||
for {set j 0} {$j < 100} {incr j} {
|
||||
$cluster set key.$j $j
|
||||
}
|
||||
for {set j 0} {$j < 100} {incr j} {
|
||||
assert {[$cluster get key.$j] eq $j}
|
||||
}
|
||||
$cluster close
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user