From 1c7c6dbdf1c0eb5f0e28875d7fcfcbf8304125e8 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 1 Apr 2016 17:12:45 +0200 Subject: [PATCH] bla --- test/lib/redis-process.js | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/test/lib/redis-process.js b/test/lib/redis-process.js index b4787d6..95af4b1 100644 --- a/test/lib/redis-process.js +++ b/test/lib/redis-process.js @@ -54,24 +54,26 @@ module.exports = { confFile = confFile.replace('.conf', '.win32.conf'); redis = 'redis-64\\tools\\redis-server.exe'; } - var rp = spawn.sync(redis, [confFile], { stdio: 'inherit' }); + var rp = spawn(redis, [confFile], { stdio: 'inherit' }); - done(null, { - spawnFailed: function () { - return false; // Remove if as soon as it's not necessary anymore - }, - stop: function (done) { - rp.once('exit', function (code) { - var error = null; - if (code !== null && code !== 0) { - error = new Error('Redis shutdown failed with code ' + code); - } - waitForRedis(false, function () { - return done(error); - }, port); - }); - rp.kill('SIGTERM'); - } - }); + waitForRedis(true, function () { + done(null, { + spawnFailed: function () { + return false; // Remove if as soon as it's not necessary anymore + }, + stop: function (done) { + rp.once('exit', function (code) { + var error = null; + if (code !== null && code !== 0) { + error = new Error('Redis shutdown failed with code ' + code); + } + waitForRedis(false, function () { + return done(error); + }, port); + }); + rp.kill('SIGTERM'); + } + }); + }, port); } };