Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
1c130c6b
Commit
1c130c6b
authored
May 02, 2014
by
antirez
Browse files
Test: cluster/base, check that we can write/read from cluster.
parent
3bc119c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/cluster/run.tcl
View file @
1c130c6b
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
cd tests/cluster
cd tests/cluster
source cluster.tcl
source cluster.tcl
source ../instances.tcl
source ../instances.tcl
source ../../support/cluster.tcl
;
# Redis Cluster client.
set ::instances_count 20
;
# How many instances we use at max.
set ::instances_count 20
;
# How many instances we use at max.
...
...
tests/cluster/tests/00-base.tcl
View file @
1c130c6b
...
@@ -94,3 +94,15 @@ test "Nodes should report cluster_state is ok now" {
...
@@ -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
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment