Skip to content

Commit

Permalink
Fix a windows test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben Bridgewater committed Mar 1, 2016
1 parent 16b87d0 commit e4428e9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
30 changes: 13 additions & 17 deletions test/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,6 @@ function startRedis (conf, done, port) {
}, path.resolve(__dirname, conf), port);
}

function startStunnel(done) {
StunnelProcess.start(function (err, _stunnel_process) {
stunnel_process = _stunnel_process;
return done(err);
}, path.resolve(__dirname, './conf'));
}

function stopStunnel(done) {
if (stunnel_process) {
StunnelProcess.stop(stunnel_process, done);
} else {
done();
}
}

// don't start redis every time we
// include this helper file!
if (!process.env.REDIS_TESTS_STARTED) {
Expand All @@ -52,8 +37,19 @@ module.exports = {
rp.stop(done);
},
startRedis: startRedis,
stopStunnel: stopStunnel,
startStunnel: startStunnel,
stopStunnel: function (done) {
if (stunnel_process) {
StunnelProcess.stop(stunnel_process, done);
} else {
done();
}
},
startStunnel: function (done) {
StunnelProcess.start(function (err, _stunnel_process) {
stunnel_process = _stunnel_process;
return done(err);
}, path.resolve(__dirname, './conf'));
},
isNumber: function (expected, done) {
return function (err, results) {
assert.strictEqual(null, err, "expected " + expected + ", got error: " + err);
Expand Down
2 changes: 1 addition & 1 deletion test/multi.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe("The 'multi' method", function () {
describe('pipeline limit', function () {

it('do not exceed maximum string size', function (done) {
this.timeout(12000); // Windows tests on 0.10 are slow
this.timeout(20000); // Windows tests are slow
// Triggers a RangeError: Invalid string length if not handled properly
client = redis.createClient();
var multi = client.multi();
Expand Down

0 comments on commit e4428e9

Please sign in to comment.