summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael-grunder <michael.grunder@gmail.com>2022-09-27 13:49:10 -0700
committerMichael Grunder <michael.grunder@gmail.com>2022-09-27 14:33:26 -0700
commit9c338a5981f12cb2a20625901b1a9fbe736e1c65 (patch)
tree0f43b1b44b4c34430031a899e5f2cc41da51a93f
parent6d5c3ee74d05d8b7d1bda49a1342fa00ccfc3367 (diff)
Fix PUSH handler tests for Redis >= 7.0.5
Redis updated how invalidation push messages are sent to the client after a FLUSHDB or FLUSHALL command. See: redis/redis#8935
-rw-r--r--test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test.c b/test.c
index 67723f2..977a89b 100644
--- a/test.c
+++ b/test.c
@@ -954,7 +954,7 @@ static void test_resp3_push_handler(redisContext *c) {
reply = redisCommand(c, "SET key:0 val:0");
/* We need another command because depending on the version of Redis, the
* notification may be delivered after the command's reply. */
- test_cond(reply != NULL);
+ assert(reply != NULL);
freeReplyObject(reply);
reply = redisCommand(c, "PING");
test_cond(reply != NULL && reply->type == REDIS_REPLY_STATUS && pc.str == 1);
@@ -962,6 +962,9 @@ static void test_resp3_push_handler(redisContext *c) {
test("We properly handle a NIL invalidation payload: ");
reply = redisCommand(c, "FLUSHDB");
+ assert(reply != NULL);
+ freeReplyObject(reply);
+ reply = redisCommand(c, "PING");
test_cond(reply != NULL && reply->type == REDIS_REPLY_STATUS && pc.nil == 1);
freeReplyObject(reply);