Skip to content

Commit 90033bd

Browse files
author
Ruben Bridgewater
committed
Fix some tests
1 parent 6d8daef commit 90033bd

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

test/lib/unref.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
// as soon as there are no outstanding commands.
44
'use strict';
55

6-
var redis = require("../../");
6+
var redis = require("../../index");
77
var HOST = process.argv[2] || '127.0.0.1';
88
var PORT = process.argv[3];
99
var args = PORT ? [PORT, HOST] : [HOST];
1010

1111
var c = redis.createClient.apply(redis, args);
12-
c.unref();
1312
c.info(function (err, reply) {
1413
if (err) process.exit(-1);
1514
if (!reply.length) process.exit(-1);
1615
process.stdout.write(reply.length.toString());
1716
});
17+
c.unref();

test/node_redis.spec.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,12 +416,14 @@ describe("The node_redis client", function () {
416416

417417
describe('unref', function () {
418418
it('exits subprocess as soon as final command is processed', function (done) {
419+
this.timeout(12000);
419420
var args = config.HOST[ip] ? [config.HOST[ip], config.PORT] : [ip];
420421
var external = fork("./test/lib/unref.js", args);
422+
421423
var id = setTimeout(function () {
422424
external.kill();
423425
return done(Error('unref subprocess timed out'));
424-
}, 5000);
426+
}, 8000);
425427

426428
external.on("close", function (code) {
427429
clearTimeout(id);
@@ -555,7 +557,7 @@ describe("The node_redis client", function () {
555557
} else {
556558
client.end();
557559
var lasted = new Date().getTime() - time;
558-
assert.ok(lasted < 50);
560+
assert.ok(lasted < 100);
559561
return done();
560562
}
561563
});

test/pubsub.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ describe("publish/subscribe", function () {
147147
});
148148
});
149149

150-
it('handles SUB_UNSUB_MSG_SUB', function (done) {
150+
it('handles SUB_UNSUB_MSG_SUB 2', function (done) {
151151
helper.serverVersionAtLeast.bind(this)(sub, [2, 6, 11]);
152152

153153
sub.psubscribe('abc*');

0 commit comments

Comments
 (0)