add worker index to port number, rather than concatenating with it

This commit is contained in:
spalger 2019-09-12 19:03:54 -07:00
parent a7352489e7
commit 351eaaf5f0

View file

@ -34,7 +34,7 @@ export async function RemoteProvider({ getService }) {
let browserDriverUrl = config.get(browserType + 'driver.url');
if (process.env.PARALLEL_PIPELINE_WORKER_INDEX) {
const parsedUrl = new URL(browserDriverUrl);
parsedUrl.port = `4444${process.env.PARALLEL_PIPELINE_WORKER_INDEX}`;
parsedUrl.port = 4444 + Number.parseInt(process.env.PARALLEL_PIPELINE_WORKER_INDEX);
browserDriverUrl = parsedUrl.href;
}