From dd563c2cb91c6b21475ea8113270a317739d80b0 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 30 Oct 2015 00:09:16 +0100 Subject: [PATCH] Fix unix only test not to run on windows --- test/connection.spec.js | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/test/connection.spec.js b/test/connection.spec.js index f5bcacdeff..c6b8d3821b 100644 --- a/test/connection.spec.js +++ b/test/connection.spec.js @@ -49,7 +49,7 @@ describe("connection tests", function () { }); it("emit an error after max retry timeout and do not try to reconnect afterwards", function (done) { - var connect_timeout = 500; // in ms + var connect_timeout = 600; // in ms client = redis.createClient({ parser: parser, connect_timeout: connect_timeout @@ -187,21 +187,23 @@ describe("connection tests", function () { }); }); - it("connect with path provided in the options object", function (done) { - client = redis.createClient({ - path: '/tmp/redis.sock', - parser: parser, - connect_timeout: 1000 + if (process.platform !== 'win32') { + it("connect with path provided in the options object", function (done) { + client = redis.createClient({ + path: '/tmp/redis.sock', + parser: parser, + connect_timeout: 1000 + }); + + var end = helper.callFuncAfter(done, 2); + + client.once('ready', function() { + end(); + }); + + client.set('foo', 'bar', end); }); - - var end = helper.callFuncAfter(done, 2); - - client.once('ready', function() { - end(); - }); - - client.set('foo', 'bar', end); - }); + } it("connects correctly with args", function (done) { client = redis.createClient.apply(redis.createClient, args);