diff --git a/test/lib/unref.js b/test/lib/unref.js index 45877a493e..2fb24bd748 100644 --- a/test/lib/unref.js +++ b/test/lib/unref.js @@ -3,15 +3,15 @@ // as soon as there are no outstanding commands. 'use strict'; -var redis = require("../../"); +var redis = require("../../index"); var HOST = process.argv[2] || '127.0.0.1'; var PORT = process.argv[3]; var args = PORT ? [PORT, HOST] : [HOST]; var c = redis.createClient.apply(redis, args); -c.unref(); c.info(function (err, reply) { if (err) process.exit(-1); if (!reply.length) process.exit(-1); process.stdout.write(reply.length.toString()); }); +c.unref(); diff --git a/test/node_redis.spec.js b/test/node_redis.spec.js index cd6659686a..64817c2c98 100644 --- a/test/node_redis.spec.js +++ b/test/node_redis.spec.js @@ -416,12 +416,14 @@ describe("The node_redis client", function () { describe('unref', function () { it('exits subprocess as soon as final command is processed', function (done) { + this.timeout(12000); var args = config.HOST[ip] ? [config.HOST[ip], config.PORT] : [ip]; var external = fork("./test/lib/unref.js", args); + var id = setTimeout(function () { external.kill(); return done(Error('unref subprocess timed out')); - }, 5000); + }, 8000); external.on("close", function (code) { clearTimeout(id); @@ -555,7 +557,7 @@ describe("The node_redis client", function () { } else { client.end(); var lasted = new Date().getTime() - time; - assert.ok(lasted < 50); + assert.ok(lasted < 100); return done(); } }); diff --git a/test/pubsub.spec.js b/test/pubsub.spec.js index b39b532cbd..9ffd831a11 100644 --- a/test/pubsub.spec.js +++ b/test/pubsub.spec.js @@ -147,7 +147,7 @@ describe("publish/subscribe", function () { }); }); - it('handles SUB_UNSUB_MSG_SUB', function (done) { + it('handles SUB_UNSUB_MSG_SUB 2', function (done) { helper.serverVersionAtLeast.bind(this)(sub, [2, 6, 11]); sub.psubscribe('abc*');