smoke test - only warn when treekill fails (#155577)

This commit is contained in:
Benjamin Pasero 2022-07-19 14:19:02 +02:00 committed by GitHub
parent aba7e6c58b
commit 5ae2a59a6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -164,11 +164,6 @@ export class Code {
});
}
if (retries === 40) {
done = true;
reject(new Error('Smoke test exit call did not terminate process after 20s, giving up'));
}
try {
process.kill(pid, 0); // throws an exception if the process doesn't exist anymore.
await new Promise(resolve => setTimeout(resolve, 500));
@ -176,6 +171,12 @@ export class Code {
done = true;
resolve();
}
if (retries === 60) {
done = true;
this.logger.log('Smoke test exit call did not terminate process after 30s, giving up');
resolve();
}
}
})();
}), 'Code#exit()', this.logger);