Skip to content

Commit c460728

Browse files
devversionvivian-hu-zz
authored andcommitted
build: increase saucelabs connect timeout (#14470)
* build: increase saucelabs connect timeout At some point we went down from a 2min wait timeout to 30seconds because we re-ran the startup script if something failed. Since re-running didn't really help and we removed it, we should move the timeout back to a longer period. e.g. see: https://circleci.com/gh/angular/material2/25254 where it successfully acquired a tunnel, but just didn't have enough time to actually establish it. * Switch to rewritten saucelabs version * Update to latest saucelabs launcher version
1 parent 4d42a90 commit c460728

File tree

5 files changed

+28
-17
lines changed

5 files changed

+28
-17
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"karma-firefox-launcher": "^1.0.1",
112112
"karma-jasmine": "^2.0.1",
113113
"karma-parallel": "^0.3.0",
114-
"karma-sauce-launcher": "^1.2.0",
114+
"karma-sauce-launcher": "^2.0.2",
115115
"karma-sourcemap-loader": "^0.3.7",
116116
"magic-string": "^0.22.4",
117117
"marked": "^0.5.1",

scripts/saucelabs/start-tunnel.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ tunnelFileName="sc-4.5.2-linux.tar.gz"
66
tunnelUrl="https://saucelabs.com/downloads/${tunnelFileName}"
77

88
tunnelTmpDir="/tmp/material-saucelabs"
9-
tunnelLogFile="${tunnelTmpDir}/saucelabs-connect.log"
109
tunnelReadyFile="${tunnelTmpDir}/readyfile"
1110
tunnelPidFile="${tunnelTmpDir}/pidfile"
1211

@@ -34,7 +33,6 @@ if [ ! -z "${CIRCLE_BUILD_NUM}" ]; then
3433
sauceArgs="${sauceArgs} --tunnel-identifier angular-material-${CIRCLE_BUILD_NUM}-${CIRCLE_NODE_INDEX}"
3534
fi
3635

37-
echo "Starting Sauce Connect in the background, logging into: ${tunnelLogFile}"
36+
echo "Starting Sauce Connect in the background. Passed arguments: ${sauceArgs}"
3837

39-
sauce-connect/bin/sc -u ${SAUCE_USERNAME} -k ${SAUCE_ACCESS_KEY} ${sauceArgs} 2>&1 >> \
40-
${tunnelLogFile} &
38+
sauce-connect/bin/sc -u ${SAUCE_USERNAME} -k ${SAUCE_ACCESS_KEY} ${sauceArgs} &

scripts/saucelabs/wait-tunnel.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
#!/bin/bash
22

33
tunnelTmpDir="/tmp/material-saucelabs"
4-
tunnelLogFile="${tunnelTmpDir}/saucelabs-connect.log"
54
tunnelReadyFile="${tunnelTmpDir}/readyfile"
65

7-
WAIT_DELAY=30
8-
9-
# Method that prints the logfile output of the saucelabs tunnel.
10-
printLog() {
11-
echo "Logfile output of Saucelabs tunnel (${tunnelLogFile}):"
12-
echo ""
13-
cat ${tunnelLogFile}
14-
}
6+
WAIT_DELAY=120
157

168
# Wait for Saucelabs Connect to be ready before exiting
179
# Time out if we wait for more than 2 minutes, so the process won't run forever.
@@ -25,7 +17,6 @@ while [ ! -f ${tunnelReadyFile} ]; do
2517
if [ $counter -gt $[${WAIT_DELAY} * 2] ]; then
2618
echo ""
2719
echo "Timed out after 2 minutes waiting for tunnel ready file"
28-
printLog
2920
exit 5
3021
fi
3122

test/karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ module.exports = config => {
121121
} else if (testPlatform === 'saucelabs') {
122122
config.sauceLabs.build = buildIdentifier;
123123
config.sauceLabs.tunnelIdentifier = tunnelIdentifier;
124+
// Setup the saucelabs reporter so that we report back to Saucelabs once
125+
// our tests finished.
126+
config.reporters.push('saucelabs');
124127
}
125128

126129
const platformBrowsers = platformMap[testPlatform];

yarn.lock

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6351,7 +6351,7 @@ [email protected]:
63516351
resolved "https://registry.yarnpkg.com/karma-requirejs/-/karma-requirejs-1.1.0.tgz#fddae2cb87d7ebc16fb0222893564d7fee578798"
63526352
integrity sha1-/driy4fX68FvsCIok1ZNf+5Xh5g=
63536353

6354-
[email protected], karma-sauce-launcher@^1.2.0:
6354+
63556355
version "1.2.0"
63566356
resolved "https://registry.yarnpkg.com/karma-sauce-launcher/-/karma-sauce-launcher-1.2.0.tgz#6f2558ddef3cf56879fa27540c8ae9f8bfd16bca"
63576357
integrity sha512-lEhtGRGS+3Yw6JSx/vJY9iQyHNtTjcojrSwNzqNUOaDceKDu9dPZqA/kr69bUO9G2T6GKbu8AZgXqy94qo31Jg==
@@ -6361,6 +6361,15 @@ [email protected], karma-sauce-launcher@^1.2.0:
63616361
saucelabs "^1.4.0"
63626362
wd "^1.4.0"
63636363

6364+
karma-sauce-launcher@^2.0.2:
6365+
version "2.0.2"
6366+
resolved "https://registry.yarnpkg.com/karma-sauce-launcher/-/karma-sauce-launcher-2.0.2.tgz#dbf98e70d86bf287b03a537cf637eb7aefa975c3"
6367+
integrity sha512-jLUFaJhHMcKpxFWUesyWYihzM5FvQiJsDwGcCtKeOy2lsWhkVw0V0Byqb1d+wU6myU1mribBtsIcub23HS4kWA==
6368+
dependencies:
6369+
sauce-connect-launcher "^1.2.4"
6370+
saucelabs "^1.5.0"
6371+
selenium-webdriver "^4.0.0-alpha.1"
6372+
63646373
[email protected], karma-sourcemap-loader@^0.3.7:
63656374
version "0.3.7"
63666375
resolved "https://registry.yarnpkg.com/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.7.tgz#91322c77f8f13d46fed062b042e1009d4c4505d8"
@@ -9518,7 +9527,7 @@ sass-graph@^2.2.4:
95189527
scss-tokenizer "^0.2.3"
95199528
yargs "^7.0.0"
95209529

9521-
sauce-connect-launcher@^1.2.2:
9530+
sauce-connect-launcher@^1.2.2, sauce-connect-launcher@^1.2.4:
95229531
version "1.2.4"
95239532
resolved "https://registry.yarnpkg.com/sauce-connect-launcher/-/sauce-connect-launcher-1.2.4.tgz#8d38f85242a9fbede1b2303b559f7e20c5609a1c"
95249533
integrity sha512-X2vfwulR6brUGiicXKxPm1GJ7dBEeP1II450Uv4bHGrcGOapZNgzJvn9aioea5IC5BPp/7qjKdE3xbbTBIVXMA==
@@ -9572,6 +9581,16 @@ [email protected], "selenium-webdriver@>= 2.53.1", selenium-webdriver@^3.
95729581
tmp "0.0.30"
95739582
xml2js "^0.4.17"
95749583

9584+
selenium-webdriver@^4.0.0-alpha.1:
9585+
version "4.0.0-alpha.1"
9586+
resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.0.0-alpha.1.tgz#cc93415e21d2dc1dfd85dfc5f6b55f3ac53933b1"
9587+
integrity sha512-z88rdjHAv3jmTZ7KSGUkTvo4rGzcDGMq0oXWHNIDK96Gs31JKVdu9+FMtT4KBrVoibg8dUicJDok6GnqqttO5Q==
9588+
dependencies:
9589+
jszip "^3.1.3"
9590+
rimraf "^2.5.4"
9591+
tmp "0.0.30"
9592+
xml2js "^0.4.17"
9593+
95759594
semver-diff@^2.0.0:
95769595
version "2.1.0"
95779596
resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36"

0 commit comments

Comments
 (0)