diff --git a/scripts/run_locally.js b/scripts/run_locally.js index 2a0b9bca58e6d832abee7774b5fa4f1696f58f9a..346fa7dda7dff3152af234e9f9fef5261e0d01fd 100755 --- a/scripts/run_locally.js +++ b/scripts/run_locally.js @@ -112,11 +112,19 @@ function runDaemon(daemon, cb) { }); }; +// start all daemons except the router in parallel var daemonNames = Object.keys(daemonsToRun); -function runNextDaemon() { - if (daemonNames.length) runDaemon(daemonNames.shift(), runNextDaemon); -} -runNextDaemon(); +daemonNames.splice(daemonNames.indexOf('router'), 1); + +var numDaemonsRun = 0; +daemonNames.forEach(function(dn) { + runDaemon(dn, function() { + if (++numDaemonsRun === daemonNames.length) { + // after all daemons are up and running, start the router + runDaemon('router', function() { }); + } + }); +}); process.on('SIGINT', function () { console.log('\nSIGINT recieved! trying to shut down gracefully...'); diff --git a/tests/conformance-test.js b/tests/conformance-test.js old mode 100644 new mode 100755 diff --git a/tests/simple-stage-user-utf8-password.js b/tests/simple-stage-user-utf8-password.js old mode 100644 new mode 100755