From 155111f7e4ef5d789c2251e05f072c952d60399b Mon Sep 17 00:00:00 2001 From: Tomasz Poradowski Date: Tue, 31 Jul 2018 14:20:29 +0200 Subject: [PATCH] corrected type of variable to get correct rank - adjusted tests/support/server.tcl to correctly work with Redis for Windows Fixes #23. --- src/t_zset.c | 2 +- tests/support/server.tcl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/t_zset.c b/src/t_zset.c index a2150201..cc6e440e 100644 --- a/src/t_zset.c +++ b/src/t_zset.c @@ -3041,7 +3041,7 @@ void zrankGenericCommand(client *c, int reverse) { robj *key = c->argv[1]; robj *ele = c->argv[2]; robj *zobj; - PORT_ULONG rank; + PORT_LONG rank; if ((zobj = lookupKeyReadOrReply(c,key,shared.nullbulk)) == NULL || checkType(c,zobj,OBJ_ZSET)) return; diff --git a/tests/support/server.tcl b/tests/support/server.tcl index 68eb40bd..834d6093 100644 --- a/tests/support/server.tcl +++ b/tests/support/server.tcl @@ -305,7 +305,7 @@ proc start_server {options {code undefined}} { # Wait for actual startup while {![info exists _pid]} { - regexp {PID:\s(\d+)} [exec cat $stdout] _ _pid + regexp -nocase {PID[:=]\s*(\d+)} [exec cat $stdout] _ _pid after 100 } @@ -334,7 +334,7 @@ proc start_server {options {code undefined}} { while 1 { # check that the server actually started and is ready for connections - if {[exec grep "ready to accept" | wc -l < $stdout] > 0} { + if {[exec grep -i "ready to accept" | wc -l < $stdout] > 0} { break } after 10