print failure message in case not all saucelabs runner could be started

pull/4506/head
webzwo0i 2020-11-22 23:54:23 +01:00
parent e824ac424d
commit d8bcfa0a49
1 changed files with 6 additions and 1 deletions

View File

@ -13,7 +13,12 @@ var allTestsPassed = true;
// overwrite the default exit code
// in case not all worker can be run (due to saucelabs limits), `queue.drain` below will not be called
// and the script would silently exit with error code 0
process.exitCode = 1;
process.exitCode = 2;
process.on('exit', (code) => {
if (code === 2){
console.log("\x1B[31mFAILED\x1B[39m Not all saucelabs runner have been started.");
}
})
var sauceTestWorker = async.queue(function (testSettings, callback) {
var browser = wd.promiseChainRemote(config.host, config.port, config.username, config.accessKey);