Skip to content

ci: fix saucelabs browser crashing due to idle timeout #23240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
"karma-jasmine": "^4.0.1",
"karma-parallel": "^0.3.0",
"karma-requirejs": "^1.1.0",
"karma-sauce-launcher": "^2.0.2",
"karma-sauce-launcher": "^4.3.6",
"karma-sourcemap-loader": "^0.3.7",
"madge": "^4.0.0",
"marked": "^2.0.0",
Expand Down Expand Up @@ -231,6 +231,7 @@
},
"resolutions": {
"browser-sync-client": "2.26.13",
"dgeni-packages/typescript": "4.3.2"
"dgeni-packages/typescript": "4.3.2",
"**/https-proxy-agent": "5.0.0"
}
}
2 changes: 1 addition & 1 deletion test/browser-providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
const browserConfig = {
'Edge87': {unitTest: {target: 'browserstack'}},
'iOS13': {unitTest: {target: 'saucelabs'}},
'iOS14': {unitTest: {target: 'saucelabs'}},
'Safari13': {unitTest: {target: 'browserstack'}},
};

Expand Down
21 changes: 5 additions & 16 deletions test/karma-browsers.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
{
"ChromeHeadlessCI": {
"base": "ChromeHeadless",
"flags": [
"--window-size=1024,768",
"--no-sandbox"
]
},
"ChromeLocalDebug": {
"base": "Chrome",
"flags": [
"--window-size=1024,768"
]
},
"SAUCELABS_IOS13": {
"SAUCELABS_IOS14": {
"base": "SauceLabs",
"appiumVersion": "1.20.1",
"deviceOrientation": "portrait",
"browserName": "Safari",
"platformVersion": "13.2",
"platformVersion": "14.3",
"platformName": "iOS",
"deviceName": "iPhone XS Simulator"
"deviceName": "iPhone 12 Pro Simulator"
},
"BROWSERSTACK_EDGE87": {
"base": "BrowserStack",
Expand Down
9 changes: 5 additions & 4 deletions test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ module.exports = config => {
frameworks: ['jasmine'],
middleware: ['fake-url'],
plugins: [
require('karma-jasmine'), require('karma-browserstack-launcher'),
require('karma-sauce-launcher'), require('karma-chrome-launcher'),
require('karma-firefox-launcher'), require('karma-sourcemap-loader'), {
require('karma-jasmine'),
require('karma-browserstack-launcher'),
require('karma-sauce-launcher'),
require('karma-sourcemap-loader'), {
'middleware:fake-url': [
'factory',
function() {
Expand Down Expand Up @@ -107,7 +108,7 @@ module.exports = config => {
browserDisconnectTolerance: 1,
browserNoActivityTimeout: 300000,

browsers: ['ChromeLocalDebug'],
browsers: [],
singleRun: false,

// Try Websocket for a faster transmission first. Fallback to polling if necessary.
Expand Down
4 changes: 3 additions & 1 deletion tools/package-tools/ts-compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import * as chalk from 'chalk';
export function tsCompile(binary: 'tsc' | 'ngc', flags: string[]) {
return new Promise<void>((resolve, reject) => {
const binaryPath = resolvePath(`./node_modules/typescript/bin/${binary}`);
const childProcess = spawn(binaryPath, flags, {shell: true});
// Use `node` for spawning the TypeScript compiler. On Windows, the shell is
// not necessarily able to detect that the `tsc` files relies on Node.
const childProcess = spawn('node', [binaryPath, ...flags], {shell: true});

// Pipe stdout and stderr from the child process.
childProcess.stdout.on('data', (data: string|Buffer) => console.log(`${data}`));
Expand Down
Loading