Skip to content

Commit

Permalink
[test] Improve BrowserStack configuration (mui#25049)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Feb 22, 2021
1 parent b7e3026 commit 6b1e69e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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: {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6b1e69e

Please sign in to comment.