]> git.saurik.com Git - redis.git/blobdiff - tests/test_helper.tcl
WATCH will now consider touched keys target of EXPIRE command after the WATCH is...
[redis.git] / tests / test_helper.tcl
index da6520a361dcf34837453606e356b68a0a840cd9..59470e6473b8780c918b1791f3fbbfd03e6010c7 100644 (file)
@@ -42,6 +42,22 @@ proc r {args} {
     [srv $level "client"] {*}$args
 }
 
+proc redis_deferring_client {args} {
+    set level 0
+    if {[llength $args] > 0 && [string is integer [lindex $args 0]]} {
+        set level [lindex $args 0]
+        set args [lrange $args 1 end]
+    }
+
+    # create client that defers reading reply
+    set client [redis [srv $level "host"] [srv $level "port"] 1]
+
+    # select the right db and read the response (OK)
+    $client select 9
+    $client read
+    return $client
+}
+
 # Provide easy access to INFO properties. Same semantic as "proc r".
 proc s {args} {
     set level 0
@@ -72,6 +88,7 @@ proc main {} {
     execute_tests "unit/cas"
     execute_tests "integration/replication"
     execute_tests "integration/aof"
+    execute_tests "unit/pubsub"
 
     # run tests with VM enabled
     set ::global_overrides {vm-enabled yes}