diff --git a/test/commands/blpop.spec.js b/test/commands/blpop.spec.js index ea9dfdf21c..e8042d6053 100644 --- a/test/commands/blpop.spec.js +++ b/test/commands/blpop.spec.js @@ -15,7 +15,7 @@ describe("The 'blpop' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/dbsize.spec.js b/test/commands/dbsize.spec.js index 7bc03219b9..6e362087a5 100644 --- a/test/commands/dbsize.spec.js +++ b/test/commands/dbsize.spec.js @@ -23,7 +23,7 @@ describe("The 'dbsize' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.quit(); }); client.on('end', function () { @@ -44,7 +44,7 @@ describe("The 'dbsize' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(function (err, res) { helper.isString("OK")(err, res); done(); diff --git a/test/commands/del.spec.js b/test/commands/del.spec.js index 0adb6327d8..5502e91b6c 100644 --- a/test/commands/del.spec.js +++ b/test/commands/del.spec.js @@ -13,7 +13,7 @@ describe("The 'del' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/eval.spec.js b/test/commands/eval.spec.js index cfbaefa82b..bdb0d48061 100644 --- a/test/commands/eval.spec.js +++ b/test/commands/eval.spec.js @@ -16,7 +16,7 @@ describe("The 'eval' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/exits.spec.js b/test/commands/exits.spec.js index 061e367133..030e68c7f5 100644 --- a/test/commands/exits.spec.js +++ b/test/commands/exits.spec.js @@ -13,7 +13,7 @@ describe("The 'exits' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/expire.spec.js b/test/commands/expire.spec.js index 1e3d9073e9..42e01b2e40 100644 --- a/test/commands/expire.spec.js +++ b/test/commands/expire.spec.js @@ -13,7 +13,7 @@ describe("The 'expire' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/flushdb.spec.js b/test/commands/flushdb.spec.js index 12f10de8e8..f80e5475be 100644 --- a/test/commands/flushdb.spec.js +++ b/test/commands/flushdb.spec.js @@ -23,7 +23,7 @@ describe("The 'flushdb' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.quit(); }); client.on('end', function () { @@ -44,7 +44,7 @@ describe("The 'flushdb' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { done(); }); }); diff --git a/test/commands/geoadd.spec.js b/test/commands/geoadd.spec.js index c98992471b..690df55de6 100644 --- a/test/commands/geoadd.spec.js +++ b/test/commands/geoadd.spec.js @@ -13,7 +13,7 @@ describe("The 'geoadd' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/get.spec.js b/test/commands/get.spec.js index 973629945d..8bb985964d 100644 --- a/test/commands/get.spec.js +++ b/test/commands/get.spec.js @@ -23,7 +23,7 @@ describe("The 'get' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.quit(); }); client.on('end', function () { @@ -44,7 +44,7 @@ describe("The 'get' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { done(); }); }); diff --git a/test/commands/getset.spec.js b/test/commands/getset.spec.js index e35ec7e616..289257573a 100644 --- a/test/commands/getset.spec.js +++ b/test/commands/getset.spec.js @@ -24,7 +24,7 @@ describe("The 'getset' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.quit(); }); client.on('end', function () { @@ -46,7 +46,7 @@ describe("The 'getset' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { done(); }); }); diff --git a/test/commands/hgetall.spec.js b/test/commands/hgetall.spec.js index faac08d08e..2a734052b5 100644 --- a/test/commands/hgetall.spec.js +++ b/test/commands/hgetall.spec.js @@ -16,7 +16,7 @@ describe("The 'hgetall' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); @@ -57,7 +57,7 @@ describe("The 'hgetall' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/hincrby.spec.js b/test/commands/hincrby.spec.js index 43a73826e3..cfa1f13297 100644 --- a/test/commands/hincrby.spec.js +++ b/test/commands/hincrby.spec.js @@ -14,7 +14,7 @@ describe("The 'hincrby' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/hlen.spec.js b/test/commands/hlen.spec.js index 3d6d675b96..d5d6b14992 100644 --- a/test/commands/hlen.spec.js +++ b/test/commands/hlen.spec.js @@ -13,7 +13,7 @@ describe("The 'hlen' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/hmget.spec.js b/test/commands/hmget.spec.js index 5d4e1df3a7..a6f566ec69 100644 --- a/test/commands/hmget.spec.js +++ b/test/commands/hmget.spec.js @@ -16,7 +16,7 @@ describe("The 'hmget' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); client.once("error", done); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(); client.HMSET(hash, {"0123456789": "abcdefghij", "some manner of key": "a type of value"}, helper.isString('OK', done)); }); diff --git a/test/commands/hmset.spec.js b/test/commands/hmset.spec.js index 6060677e0f..1f8f15096d 100644 --- a/test/commands/hmset.spec.js +++ b/test/commands/hmset.spec.js @@ -15,7 +15,7 @@ describe("The 'hmset' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/hset.spec.js b/test/commands/hset.spec.js index 66ff79086c..8ce8996d86 100644 --- a/test/commands/hset.spec.js +++ b/test/commands/hset.spec.js @@ -15,7 +15,7 @@ describe("The 'hset' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/incr.spec.js b/test/commands/incr.spec.js index cdf5fecac3..3803585ff4 100644 --- a/test/commands/incr.spec.js +++ b/test/commands/incr.spec.js @@ -17,7 +17,7 @@ describe("The 'incr' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.set(key, "9007199254740992", function (err, res) { helper.isNotError()(err, res); client.quit(); @@ -55,7 +55,7 @@ describe("The 'incr' method", function () { */ client = redis.createClient.apply(redis.createClient, args); client.once("error", done); - client.once("connect", function () { + client.once("ready", function () { client.set(key, "9007199254740992", function (err, res) { helper.isNotError()(err, res); done(); diff --git a/test/commands/keys.spec.js b/test/commands/keys.spec.js index 58159072f6..6437aeb0a8 100644 --- a/test/commands/keys.spec.js +++ b/test/commands/keys.spec.js @@ -18,7 +18,7 @@ describe("The 'keys' method", function () { // This is going to test if the high water is also respected args.command_queue_high_water = 100; client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/mget.spec.js b/test/commands/mget.spec.js index 54f48a7cff..447fac0490 100644 --- a/test/commands/mget.spec.js +++ b/test/commands/mget.spec.js @@ -15,7 +15,7 @@ describe("The 'mget' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); client.once("error", done); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(); client.mset(["mget keys 1", "mget val 1", "mget keys 2", "mget val 2", "mget keys 3", "mget val 3"], done); }); diff --git a/test/commands/mset.spec.js b/test/commands/mset.spec.js index be2e3a4baf..366f52c889 100644 --- a/test/commands/mset.spec.js +++ b/test/commands/mset.spec.js @@ -25,7 +25,7 @@ describe("The 'mset' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.quit(); }); client.on('end', function () { @@ -46,7 +46,7 @@ describe("The 'mset' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { done(); }); }); diff --git a/test/commands/msetnx.spec.js b/test/commands/msetnx.spec.js index 7af7fbc27a..e89780ac75 100644 --- a/test/commands/msetnx.spec.js +++ b/test/commands/msetnx.spec.js @@ -13,7 +13,7 @@ describe("The 'msetnx' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/multi.spec.js b/test/commands/multi.spec.js index 5ce3fa82b0..fa099a2856 100644 --- a/test/commands/multi.spec.js +++ b/test/commands/multi.spec.js @@ -23,7 +23,7 @@ describe("The 'multi' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.quit(); }); client.on('end', function () { diff --git a/test/commands/randomkey.test.js b/test/commands/randomkey.test.js index 85e61ef597..870726daef 100644 --- a/test/commands/randomkey.test.js +++ b/test/commands/randomkey.test.js @@ -14,7 +14,7 @@ describe("The 'randomkey' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/rename.spec.js b/test/commands/rename.spec.js index 02434cc923..65dad08e7f 100644 --- a/test/commands/rename.spec.js +++ b/test/commands/rename.spec.js @@ -13,7 +13,7 @@ describe("The 'rename' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/renamenx.spec.js b/test/commands/renamenx.spec.js index e2fbdcfd03..e5020155ba 100644 --- a/test/commands/renamenx.spec.js +++ b/test/commands/renamenx.spec.js @@ -13,7 +13,7 @@ describe("The 'renamenx' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/rpush.spec.js b/test/commands/rpush.spec.js index ba3cb56415..2a0d72fd22 100644 --- a/test/commands/rpush.spec.js +++ b/test/commands/rpush.spec.js @@ -14,7 +14,7 @@ describe("The 'rpush' command", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/sadd.spec.js b/test/commands/sadd.spec.js index dcc5e1cd42..9aa246487d 100644 --- a/test/commands/sadd.spec.js +++ b/test/commands/sadd.spec.js @@ -14,7 +14,7 @@ describe("The 'sadd' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/scard.spec.js b/test/commands/scard.spec.js index 8c366e7383..5246782309 100644 --- a/test/commands/scard.spec.js +++ b/test/commands/scard.spec.js @@ -13,7 +13,7 @@ describe("The 'scard' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/script.spec.js b/test/commands/script.spec.js index 19d77084b8..c3e1340702 100644 --- a/test/commands/script.spec.js +++ b/test/commands/script.spec.js @@ -17,7 +17,7 @@ describe("The 'script' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/sdiff.spec.js b/test/commands/sdiff.spec.js index 43c6d1434e..435ddf63e9 100644 --- a/test/commands/sdiff.spec.js +++ b/test/commands/sdiff.spec.js @@ -14,7 +14,7 @@ describe("The 'sdiff' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/sdiffstore.spec.js b/test/commands/sdiffstore.spec.js index 52abb487e4..00bc2c8e12 100644 --- a/test/commands/sdiffstore.spec.js +++ b/test/commands/sdiffstore.spec.js @@ -14,7 +14,7 @@ describe("The 'sdiffstore' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/select.spec.js b/test/commands/select.spec.js index 832d5ffac1..dc121b781a 100644 --- a/test/commands/select.spec.js +++ b/test/commands/select.spec.js @@ -15,7 +15,7 @@ describe("The 'select' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.quit(); }); client.on('end', function () { diff --git a/test/commands/set.spec.js b/test/commands/set.spec.js index 6354f97f61..e76b0c88db 100644 --- a/test/commands/set.spec.js +++ b/test/commands/set.spec.js @@ -23,7 +23,7 @@ describe("The 'set' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.quit(); }); client.on('end', function () { @@ -44,7 +44,7 @@ describe("The 'set' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { done(); }); }); diff --git a/test/commands/setex.spec.js b/test/commands/setex.spec.js index 5ad1fd1b41..e8de49bd57 100644 --- a/test/commands/setex.spec.js +++ b/test/commands/setex.spec.js @@ -14,7 +14,7 @@ describe("The 'setex' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/setnx.spec.js b/test/commands/setnx.spec.js index 5d9f358dc7..229eb2b58b 100644 --- a/test/commands/setnx.spec.js +++ b/test/commands/setnx.spec.js @@ -13,7 +13,7 @@ describe("The 'setnx' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/sinter.spec.js b/test/commands/sinter.spec.js index b7df78c995..a655b86068 100644 --- a/test/commands/sinter.spec.js +++ b/test/commands/sinter.spec.js @@ -14,7 +14,7 @@ describe("The 'sinter' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/sinterstore.spec.js b/test/commands/sinterstore.spec.js index f789c42dfb..38b7dcfb5b 100644 --- a/test/commands/sinterstore.spec.js +++ b/test/commands/sinterstore.spec.js @@ -14,7 +14,7 @@ describe("The 'sinterstore' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/sismember.spec.js b/test/commands/sismember.spec.js index a7ee9ad0e0..eefd37e408 100644 --- a/test/commands/sismember.spec.js +++ b/test/commands/sismember.spec.js @@ -13,7 +13,7 @@ describe("The 'sismember' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/slowlog.spec.js b/test/commands/slowlog.spec.js index eee3fa1d87..b2fbebdfe9 100644 --- a/test/commands/slowlog.spec.js +++ b/test/commands/slowlog.spec.js @@ -14,7 +14,7 @@ describe("The 'slowlog' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/smembers.spec.js b/test/commands/smembers.spec.js index 32078ef7bd..e92a658d50 100644 --- a/test/commands/smembers.spec.js +++ b/test/commands/smembers.spec.js @@ -14,7 +14,7 @@ describe("The 'smembers' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/smove.spec.js b/test/commands/smove.spec.js index e16e619119..123ff163a7 100644 --- a/test/commands/smove.spec.js +++ b/test/commands/smove.spec.js @@ -13,7 +13,7 @@ describe("The 'smove' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/spop.spec.js b/test/commands/spop.spec.js index 2df75dd653..f8d4d46ede 100644 --- a/test/commands/spop.spec.js +++ b/test/commands/spop.spec.js @@ -14,7 +14,7 @@ describe("The 'spop' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/srem.spec.js b/test/commands/srem.spec.js index 1ce496b961..e4e552ec5d 100644 --- a/test/commands/srem.spec.js +++ b/test/commands/srem.spec.js @@ -14,7 +14,7 @@ describe("The 'srem' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/sunion.spec.js b/test/commands/sunion.spec.js index 6fb1bb0332..638cb116a6 100644 --- a/test/commands/sunion.spec.js +++ b/test/commands/sunion.spec.js @@ -14,7 +14,7 @@ describe("The 'sunion' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/sunionstore.spec.js b/test/commands/sunionstore.spec.js index c6e9cdeb60..3ebb10b085 100644 --- a/test/commands/sunionstore.spec.js +++ b/test/commands/sunionstore.spec.js @@ -14,7 +14,7 @@ describe("The 'sunionstore' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/sync.spec.js b/test/commands/sync.spec.js index a2d9009abe..6a9813112b 100644 --- a/test/commands/sync.spec.js +++ b/test/commands/sync.spec.js @@ -14,7 +14,7 @@ describe.skip("The 'sync' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/ttl.spec.js b/test/commands/ttl.spec.js index edc2db5c10..deec21720a 100644 --- a/test/commands/ttl.spec.js +++ b/test/commands/ttl.spec.js @@ -14,7 +14,7 @@ describe("The 'ttl' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/type.spec.js b/test/commands/type.spec.js index 9c99da0fbd..c652e76d96 100644 --- a/test/commands/type.spec.js +++ b/test/commands/type.spec.js @@ -13,7 +13,7 @@ describe("The 'type' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/watch.spec.js b/test/commands/watch.spec.js index 133fc770ca..87bcc81d22 100644 --- a/test/commands/watch.spec.js +++ b/test/commands/watch.spec.js @@ -16,7 +16,7 @@ describe("The 'watch' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/zadd.spec.js b/test/commands/zadd.spec.js index 973660dcd0..514c51b339 100644 --- a/test/commands/zadd.spec.js +++ b/test/commands/zadd.spec.js @@ -14,7 +14,7 @@ describe("The 'zadd' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/commands/zscore.spec.js b/test/commands/zscore.spec.js index fc5d6f37a0..43964a32b3 100644 --- a/test/commands/zscore.spec.js +++ b/test/commands/zscore.spec.js @@ -14,7 +14,7 @@ describe("The 'zscore' method", function () { beforeEach(function (done) { client = redis.createClient.apply(redis.createClient, args); - client.once("connect", function () { + client.once("ready", function () { client.flushdb(done); }); }); diff --git a/test/connection.spec.js b/test/connection.spec.js index 042eabb7ee..3def5eb15f 100644 --- a/test/connection.spec.js +++ b/test/connection.spec.js @@ -88,7 +88,7 @@ describe("on lost connection", function () { var end = helper.callFuncAfter(done, 2); client.on('error', function (err) { - assert(/CONNECTION_BROKEN|ENOTFOUND/.test(err.code)); + assert(/CONNECTION_BROKEN|ENOTFOUND|EAI_AGAIN/.test(err.code)); end(); });