From 8db3d65211a60ee1842a8fa7436a313df9fe2663 Mon Sep 17 00:00:00 2001 From: spalger Date: Thu, 4 May 2017 11:02:32 -0700 Subject: [PATCH] address review requests --- src/cli/cluster/worker.js | 4 ++-- .../services/remote/chromedriver_api/chromedriver_api.js | 9 --------- .../remote/chromedriver_api/chromedriver_local_api.js | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/cli/cluster/worker.js b/src/cli/cluster/worker.js index 2c16ecf411154..88a7d76516f99 100644 --- a/src/cli/cluster/worker.js +++ b/src/cli/cluster/worker.js @@ -89,7 +89,7 @@ module.exports = class Worker extends EventEmitter { // we don't need to react to process.exit anymore this.processBinder.destroy(); - // wait until the cluster reports this fork has exitted, then resolve + // wait until the cluster reports this fork has exited, then resolve await new Promise(resolve => this.once('fork:exit', resolve)); } } @@ -153,7 +153,7 @@ module.exports = class Worker extends EventEmitter { this.forkBinder.on('online', () => this.onOnline()); this.forkBinder.on('disconnect', () => this.onDisconnect()); - // when the cluster says a fork has exitted, check if it is ours + // when the cluster says a fork has exited, check if it is ours this.clusterBinder.on('exit', (fork, code) => this.onExit(fork, code)); // when the process exits, make sure we kill our workers diff --git a/test/functional/services/remote/chromedriver_api/chromedriver_api.js b/test/functional/services/remote/chromedriver_api/chromedriver_api.js index 3bf9521291562..28680ec2f8af6 100644 --- a/test/functional/services/remote/chromedriver_api/chromedriver_api.js +++ b/test/functional/services/remote/chromedriver_api/chromedriver_api.js @@ -12,15 +12,6 @@ const noop = () => {}; * @type {Object} */ export class ChromedriverApi extends EventEmitter { - - /** - * Create an instance of the ChromedriverApi for a url. - * - * @param {ToolingLog} log - * @param {Lifecycle} lifecycle - * @param {String} url - * @return {Promise} - */ static async factory(log, url) { return (await ping(url)) ? createRemoteChromedriverApi(log, url) diff --git a/test/functional/services/remote/chromedriver_api/chromedriver_local_api.js b/test/functional/services/remote/chromedriver_api/chromedriver_local_api.js index 3acc230093bef..77b968323fd43 100644 --- a/test/functional/services/remote/chromedriver_api/chromedriver_local_api.js +++ b/test/functional/services/remote/chromedriver_api/chromedriver_local_api.js @@ -33,7 +33,7 @@ export function createLocalChromedriverApi(log, url) { proc.on('exit', (code) => { if (!api.isStopped() || code > 0) { - api.emit('error', new Error(`Chromedriver exitted with code ${code}`)); + api.emit('error', new Error(`Chromedriver exited with code ${code}`)); } });