ci: extend default timeout of karma tests for legacy saucelab tests (#42473)

After testing, it seems that the flakyness we are experiencing in our legacy
saucelabs job is caused by timeouts which happen due to the karma server being
unable to serve all of the files needed for the tests fast enough while concurrent
tests are being run.

PR Close #42473
This commit is contained in:
Joey Perrott 2021-06-03 15:18:19 -07:00 committed by Jessica Janiuk
parent 1684b70b88
commit ae858c0504
2 changed files with 5 additions and 1 deletions

View File

@ -8,6 +8,7 @@
const browserProvidersConf = require('./browser-providers.conf'); const browserProvidersConf = require('./browser-providers.conf');
const {generateSeed} = require('./tools/jasmine-seed-generator'); const {generateSeed} = require('./tools/jasmine-seed-generator');
const {hostname} = require('os');
// Karma configuration // Karma configuration
// Generated on Thu Sep 25 2014 11:52:02 GMT-0700 (PDT) // Generated on Thu Sep 25 2014 11:52:02 GMT-0700 (PDT)
@ -20,6 +21,7 @@ module.exports = function(config) {
random: true, random: true,
seed: generateSeed('karma-js.conf'), seed: generateSeed('karma-js.conf'),
}, },
captureConsole: process.env.CI ? false : true,
}, },
files: [ files: [
@ -182,6 +184,8 @@ module.exports = function(config) {
// More context can be found in: https://github.com/angular/angular/pull/35171. // More context can be found in: https://github.com/angular/angular/pull/35171.
if (process.env.SAUCE_LOCALHOST_ALIAS_DOMAIN) { if (process.env.SAUCE_LOCALHOST_ALIAS_DOMAIN) {
conf.hostname = process.env.SAUCE_LOCALHOST_ALIAS_DOMAIN; conf.hostname = process.env.SAUCE_LOCALHOST_ALIAS_DOMAIN;
} else {
conf.hostname = hostname();
} }
if (process.env.KARMA_WEB_TEST_MODE) { if (process.env.KARMA_WEB_TEST_MODE) {

View File

@ -9,7 +9,7 @@
// Tun on full stack traces in errors to help debugging // Tun on full stack traces in errors to help debugging
Error.stackTraceLimit = Infinity; Error.stackTraceLimit = Infinity;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 3000; jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000;
// Cancel Karma's synchronous start, // Cancel Karma's synchronous start,
// we will call `__karma__.start()` later, once all the specs are loaded. // we will call `__karma__.start()` later, once all the specs are loaded.