提交 402b1170 编写于 作者: A antirez

Test: cluster/base, check that we can write/read from cluster.

上级 f188fa4a
......@@ -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
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册