add some time for mongodb startup

This commit is contained in:
Philipp Kunz 2016-09-11 16:56:23 +02:00
parent 3be5c3b8ab
commit a861444c30
2 changed files with 5 additions and 3 deletions

View File

@ -6,8 +6,9 @@ let mongoChildProcess;
let testDbConnection;
describe('mongodb', function () {
it('should start mongodb', function (done) {
this.timeout(10000);
mongoChildProcess = shelljs.exec('mongod --dbpath=./test/data --port 27017', { async: true });
setTimeout(() => { done(); }, 1500);
setTimeout(() => { done(); }, 5000); // give mongodb it some time to complete startup
});
});
describe('smartdata', function () {
@ -27,4 +28,4 @@ describe('mongodb', function () {
mongoChildProcess.kill('SIGTERM');
});
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FDUCxDQUFDLENBRG9CO0FBQ3JCLE1BQVksT0FBTyxXQUFNLFNBQ3pCLENBQUMsQ0FEaUM7QUFFbEMsTUFBWSxTQUFTLFdBQU0sZUFHM0IsQ0FBQyxDQUh5QztBQUcxQyxJQUFJLGlCQUFpQixDQUFBO0FBQ3JCLElBQUksZ0JBQXdDLENBQUE7QUFHNUMsUUFBUSxDQUFDLFNBQVMsRUFBQztJQUNmLEVBQUUsQ0FBQyxzQkFBc0IsRUFBQyxVQUFTLElBQUk7UUFDbkMsaUJBQWlCLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQywwQ0FBMEMsRUFBQyxFQUFDLEtBQUssRUFBRSxJQUFJLEVBQUMsQ0FBQyxDQUFBO1FBQzFGLFVBQVUsQ0FBQyxRQUFRLElBQUksRUFBRSxDQUFBLENBQUMsQ0FBQyxFQUFFLElBQUksQ0FBQyxDQUFBO0lBQ3RDLENBQUMsQ0FBQyxDQUFBO0FBQ04sQ0FBQyxDQUFDLENBQUE7QUFDRixRQUFRLENBQUMsV0FBVyxFQUFDO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JLENBQUMsd0NBQXdDLENBQUMsQ0FBQTtRQUN0RCxpQkFBaUIsQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUE7SUFDckMsQ0FBQyxDQUFDLENBQUE7QUFDTixDQUFDLENBQUMsQ0FBQSJ9

View File

@ -10,8 +10,9 @@ let testDbConnection: smartdata.DbConnection
describe('mongodb',function(){
it('should start mongodb',function(done){
this.timeout(10000)
mongoChildProcess = shelljs.exec('mongod --dbpath=./test/data --port 27017',{async: true})
setTimeout(() => { done() }, 1500)
setTimeout(() => { done() }, 5000) // give mongodb it some time to complete startup
})
})
describe('smartdata',function(){