Skip to content

Commit

Permalink
wait a bit until recycle in test
Browse files Browse the repository at this point in the history
  • Loading branch information
pofider committed Sep 28, 2019
1 parent 2f6d64e commit 81f9600
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,18 @@ describe('scripts manager', function () {
done(new Error('should have failed'))
}

scriptsManager2.execute({}, { execModulePath: path.join(__dirname, 'scripts', 'script.js') }, function (err, res) {
if (err) {
scriptsManager2.kill()
return done(err)
}
// seems we need to wait a bit until it is restarted fully?
setTimeout(function () {
scriptsManager2.execute({}, { execModulePath: path.join(__dirname, 'scripts', 'script.js') }, function (err, res) {
if (err) {
scriptsManager2.kill()
return done(err)
}

scriptsManager2.kill()
done()
})
scriptsManager2.kill()
done()
})
}, 100)
})
})
})
Expand Down

0 comments on commit 81f9600

Please sign in to comment.