mirror of
https://github.com/Hopiu/webapi-eca.git
synced 2026-03-16 22:10:31 +00:00
unit tests need to wait until the event poller timeout ended
This commit is contained in:
parent
1a13f954aa
commit
234be71402
2 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue