Skip to content

Commit 383bafd

Browse files
committed
limit cbtests to 2.6.11 and above
Test hangs on older versions of Redis
1 parent 655681f commit 383bafd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,8 +881,11 @@ tests.PUNSUB_EMPTY = function () {
881881
};
882882

883883
tests.UNSUB_EMPTY_CB = function () {
884-
// test situation where unsubscribe reply[1] is null
885884
var name = "UNSUB_EMPTY_CB";
885+
// test hangs on older versions of redis, so skip
886+
if (!server_version_at_least(client, [2, 6, 11])) return next(name);
887+
888+
// test situation where unsubscribe reply[1] is null
886889
client3.unsubscribe(); // unsubscribe from all so can test null
887890
client3.unsubscribe(function (err, results) {
888891
// reply[1] will be null
@@ -892,8 +895,11 @@ tests.UNSUB_EMPTY_CB = function () {
892895
};
893896

894897
tests.PUNSUB_EMPTY_CB = function () {
895-
// test situation where punsubscribe reply[1] is null
896898
var name = "PUNSUB_EMPTY_CB";
899+
// test hangs on older versions of redis, so skip
900+
if (!server_version_at_least(client, [2, 6, 11])) return next(name);
901+
902+
// test situation where punsubscribe reply[1] is null
897903
client3.punsubscribe(); // punsubscribe from all so can test null
898904
client3.punsubscribe(function (err, results) {
899905
// reply[1] will be null

0 commit comments

Comments
 (0)