summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-06-18 15:54:55 +0200
committerantirez <antirez@gmail.com>2014-06-18 15:55:04 +0200
commit5260ce1260803f5153e33e66014c60d7b6f855ab (patch)
tree26902f04c45ce6e0d2d4d1baba29e32c81db3a8d
parent670d164fbe60b5f6018ea6cb7a1c778f838ea755 (diff)
downloadredis-5260ce1260803f5153e33e66014c60d7b6f855ab.tar.gz
Sentienl/Redis test: enable link reconnection in instances.tcl.
-rw-r--r--tests/instances.tcl8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/instances.tcl b/tests/instances.tcl
index 358c2affc..26d0737c6 100644
--- a/tests/instances.tcl
+++ b/tests/instances.tcl
@@ -74,11 +74,13 @@ proc spawn_instance {type base_port count {conf {}}} {
}
# Push the instance into the right list
+ set link [redis 127.0.0.1 $port]
+ $link reconnect 1
lappend ::${type}_instances [list \
pid $pid \
host 127.0.0.1 \
port $port \
- link [redis 127.0.0.1 $port] \
+ link $link \
]
}
}
@@ -398,6 +400,8 @@ proc restart_instance {type id} {
}
# Connect with it with a fresh link
- set_instance_attrib $type $id link [redis 127.0.0.1 $port]
+ set link [redis 127.0.0.1 $port]
+ $link reconnect 1
+ set_instance_attrib $type $id link $link
}