From 0db1152492d995416cafca1cb01f538522761430 Mon Sep 17 00:00:00 2001 From: bcoe Date: Sat, 3 Oct 2015 21:08:00 -0700 Subject: [PATCH] tests were failing on my old mac (node 0.10.40, osx 10.9.5, 2.8.7) --- test/helper.js | 6 +++--- test/node_redis.spec.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/helper.js b/test/helper.js index 5f4f791b95..b92f3d5e1b 100644 --- a/test/helper.js +++ b/test/helper.js @@ -159,11 +159,11 @@ module.exports = { killConnection: function (client) { // Change the connection option to a non existing one and destroy the stream client.connectionOption = { - port: 6370, - host: '127.0.0.2', + port: 999999, + host: '127.0.0.1', family: 4 }; - client.address = '127.0.0.2:6370'; + client.address = '127.0.0.1:999999'; client.stream.destroy(); } }; diff --git a/test/node_redis.spec.js b/test/node_redis.spec.js index f45480eb79..f3df657fa5 100644 --- a/test/node_redis.spec.js +++ b/test/node_redis.spec.js @@ -214,7 +214,7 @@ describe("The node_redis client", function () { var client = redis.createClient(); client.quit(function() { client.get("foo", function(err, res) { - assert.strictEqual(err.message, 'Redis connection gone from end event.'); + assert(err.message.indexOf('Redis connection gone') !== -1); assert.strictEqual(client.offline_queue.length, 0); done(); }); @@ -619,7 +619,7 @@ describe("The node_redis client", function () { client.set('baz', 13); client.set('foo', 'bar', function(err, result) { assert(i, 3); - assert('Redis connection gone from error event', err.message); + assert(err); assert.strictEqual(client.offline_queue.length, 0); }); });