unit tests need to wait until the event poller timeout ended

This commit is contained in:
Dominic Bosch 2014-04-06 22:03:46 +02:00
parent 1a13f954aa
commit 234be71402
2 changed files with 5 additions and 4 deletions

View file

@ -72,7 +72,7 @@ exports.testHttpPortAlreadyUsed = ( test ) =>
isRunning = false
test.done()
setTimeout fWaitForDeath, 1000
setTimeout fWaitForDeath, 12000
# Garbage collect eventually still running process
fWaitForDeath = () =>
@ -105,7 +105,7 @@ exports.testHttpPortInvalid = ( test ) ->
test.done()
# engine.kill()
setTimeout fWaitForDeath, 1000
setTimeout fWaitForDeath, 12000
exports.testDbPortInvalid = ( test ) ->
test.expect 1
@ -127,4 +127,4 @@ exports.testDbPortInvalid = ( test ) ->
test.ok false, '"testHttpPortInvalid" Engine didn\'t shut down!'
test.done()
setTimeout fWaitForDeath, 1000
setTimeout fWaitForDeath, 12000

View file

@ -6,7 +6,8 @@ var fs = require( 'fs' ),
db = require( './js/persistence' ),
args = process.argv.slice( 2 ),
fEnd = function() {
console.log( 'Shutting down DB from unit_test.sh script...' );
console.log( 'Shutting down DB from unit_test.sh script. '
+'This might take as long as the event poller loop delay is...' );
db.shutDown();
};