Skip to content

Commit cdd6663

Browse files
devversionmmalerba
authored andcommitted
ci: fix saucelabs browser crashing due to idle timeout (#23240)
1 parent fd5f3da commit cdd6663

File tree

6 files changed

+1307
-121
lines changed

6 files changed

+1307
-121
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
"karma-jasmine": "^4.0.1",
193193
"karma-parallel": "^0.3.0",
194194
"karma-requirejs": "^1.1.0",
195-
"karma-sauce-launcher": "^2.0.2",
195+
"karma-sauce-launcher": "^4.3.6",
196196
"karma-sourcemap-loader": "^0.3.7",
197197
"madge": "^4.0.0",
198198
"marked": "^2.0.0",
@@ -229,6 +229,7 @@
229229
},
230230
"resolutions": {
231231
"browser-sync-client": "2.26.13",
232-
"dgeni-packages/typescript": "4.3.2"
232+
"dgeni-packages/typescript": "4.3.2",
233+
"**/https-proxy-agent": "5.0.0"
233234
}
234235
}

test/browser-providers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
const browserConfig = {
1010
'Edge87': {unitTest: {target: 'browserstack'}},
11-
'iOS13': {unitTest: {target: 'saucelabs'}},
11+
'iOS14': {unitTest: {target: 'saucelabs'}},
1212
'Safari13': {unitTest: {target: 'browserstack'}},
1313
};
1414

test/karma-browsers.json

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
{
2-
"ChromeHeadlessCI": {
3-
"base": "ChromeHeadless",
4-
"flags": [
5-
"--window-size=1024,768",
6-
"--no-sandbox"
7-
]
8-
},
9-
"ChromeLocalDebug": {
10-
"base": "Chrome",
11-
"flags": [
12-
"--window-size=1024,768"
13-
]
14-
},
15-
"SAUCELABS_IOS13": {
2+
"SAUCELABS_IOS14": {
163
"base": "SauceLabs",
4+
"appiumVersion": "1.20.1",
5+
"deviceOrientation": "portrait",
176
"browserName": "Safari",
18-
"platformVersion": "13.2",
7+
"platformVersion": "14.3",
198
"platformName": "iOS",
20-
"deviceName": "iPhone XS Simulator"
9+
"deviceName": "iPhone 12 Pro Simulator"
2110
},
2211
"BROWSERSTACK_EDGE87": {
2312
"base": "BrowserStack",

test/karma.conf.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ module.exports = config => {
77
frameworks: ['jasmine'],
88
middleware: ['fake-url'],
99
plugins: [
10-
require('karma-jasmine'), require('karma-browserstack-launcher'),
11-
require('karma-sauce-launcher'), require('karma-chrome-launcher'),
12-
require('karma-firefox-launcher'), require('karma-sourcemap-loader'), {
10+
require('karma-jasmine'),
11+
require('karma-browserstack-launcher'),
12+
require('karma-sauce-launcher'),
13+
require('karma-sourcemap-loader'), {
1314
'middleware:fake-url': [
1415
'factory',
1516
function() {
@@ -106,7 +107,7 @@ module.exports = config => {
106107
browserDisconnectTolerance: 1,
107108
browserNoActivityTimeout: 300000,
108109

109-
browsers: ['ChromeLocalDebug'],
110+
browsers: [],
110111
singleRun: false,
111112

112113
// Try Websocket for a faster transmission first. Fallback to polling if necessary.

tools/package-tools/ts-compile.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ import * as chalk from 'chalk';
1111
export function tsCompile(binary: 'tsc' | 'ngc', flags: string[]) {
1212
return new Promise<void>((resolve, reject) => {
1313
const binaryPath = resolvePath(`./node_modules/typescript/bin/${binary}`);
14-
const childProcess = spawn(binaryPath, flags, {shell: true});
14+
// Use `node` for spawning the TypeScript compiler. On Windows, the shell is
15+
// not necessarily able to detect that the `tsc` files relies on Node.
16+
const childProcess = spawn('node', [binaryPath, ...flags], {shell: true});
1517

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

0 commit comments

Comments
 (0)