fix mongodb startup

This commit is contained in:
2016-11-18 13:20:43 +01:00
parent 715709f3ec
commit b45e7ee206
3 changed files with 11 additions and 4 deletions

View File

@ -23,7 +23,7 @@ describe('mongodb', function () {
this.timeout(30000)
mongoChildProcess = shelljs.exec('mongod --dbpath=./test/data --port 27017', { async: true, silent: true })
let doneCalled = false
mongoChildProcess.stdout.on('new', function (data) {
mongoChildProcess.stdout.on('data', function (data) {
console.log(smartstring.indent.indentWithPrefix(data, '*** MongoDB Process *** : '))
if (!doneCalled) {
if (/waiting for connections on port 27017/.test(data)) {