From 6b1e69e50622a91261dfbdb04e89c2c02d19ec82 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Mon, 22 Feb 2021 20:10:23 +0100 Subject: [PATCH] [test] Improve BrowserStack configuration (#25049) --- test/karma.conf.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/karma.conf.js b/test/karma.conf.js index bf4da103dc07c4..1b92eeaaa82bb7 100644 --- a/test/karma.conf.js +++ b/test/karma.conf.js @@ -13,6 +13,8 @@ const browserStack = { username: process.env.BROWSERSTACK_USERNAME, accessKey: process.env.BROWSERSTACK_ACCESS_KEY, build, + // https://github.com/browserstack/api#timeout300 + timeout: 5.5 * 60, // Maximum time before a worker is terminated. Default 5 minutes. }; process.env.CHROME_BIN = playwright.chromium.executablePath(); @@ -31,9 +33,9 @@ module.exports = function setKarmaConfig(config) { const baseConfig = { basePath: '../', browsers: ['chromeHeadless'], - browserDisconnectTimeout: 120000, // default 2000 + browserDisconnectTimeout: 3 * 60 * 1000, // default 2000 browserDisconnectTolerance: 1, // default 0 - browserNoActivityTimeout: 6 * 60 * 1000, // default 10000 + browserNoActivityTimeout: 3 * 60 * 1000, // default 30000 colors: true, client: { mocha: { @@ -166,7 +168,7 @@ module.exports = function setKarmaConfig(config) { const browserstackBrowsersUsed = newConfig.browsers.length - 1; // default 1000, Avoid Rate Limit Exceeded - newConfig.pollingTimeout = + newConfig.browserStack.pollingTimeout = ((MAX_CIRCLE_CI_CONCURRENCY * AVERAGE_KARMA_BUILD * browserstackBrowsersUsed) / MAX_REQUEST_PER_SECOND_BROWSERSTACK) * 1000;