Skip to content

Commit 9bb4809

Browse files
devversionjelbourn
authored andcommitted
chore(saucelabs): interrupt if saucelabs tunnel does not start (#1747)
1 parent 2bab92a commit 9bb4809

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

scripts/browserstack/waitfor_tunnel.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33

44
# Wait for Connect to be ready before exiting
5-
# Time out if we wait for more than 2 minutes, so that we can print logs.
5+
# Time out if we wait for more than 2 minutes, so the process won't run forever.
66
let "counter=0"
77

88
while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do
99
let "counter++"
10+
1011
if [ $counter -gt 240 ]; then
11-
echo "Timed out after 2 minutes waiting for browser provider ready file"
12-
# We must manually print logs here because travis will not run
13-
# after_script commands if the failure occurs before the script
14-
# phase.
15-
./scripts/ci/print-logs.sh
12+
echo
13+
echo "Timed out after 2 minutes waiting for tunnel ready file"
1614
exit 5
1715
fi
16+
17+
printf "."
1818
sleep .5
1919
done

scripts/sauce/sauce_connect_block.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,24 @@
22

33
# Wait for Connect to be ready before exiting
44
echo "Connecting to Sauce Labs"
5+
6+
7+
# Wait for Saucelabs Connect to be ready before exiting
8+
# Time out if we wait for more than 2 minutes, so the process won't run forever.
9+
let "counter=0"
10+
511
while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do
12+
let "counter++"
13+
14+
if [ $counter -gt 240 ]; then
15+
echo
16+
echo "Timed out after 2 minutes waiting for tunnel ready file"
17+
exit 5
18+
fi
19+
620
printf "."
721
sleep .5
822
done
23+
924
echo
1025
echo "Connected"

0 commit comments

Comments
 (0)