Skip to content

ci: shorter wait timeout for saucelabs and browserstack #6317

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 1 commit into from
Aug 7, 2017
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
7 changes: 5 additions & 2 deletions scripts/browserstack/wait-tunnel.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

TUNNEL_LOG="$LOGS_DIR/browserstack-tunnel.log"
WAIT_DELAY=60

# Method that prints the logfile output of the browserstack tunnel.
printLog() {
Expand All @@ -24,15 +25,17 @@ fi
while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do
let "counter++"

if [ $counter -gt 240 ]; then
# Counter needs to be multiplied by two because the while loop only sleeps a half second.
# This has been made in favor of better progress logging (printing dots every half second)
if [ $counter -gt $[${WAIT_DELAY} * 2] ]; then
echo
echo "Timed out after 2 minutes waiting for tunnel ready file"
printLog
exit 5
fi

printf "."
sleep .5
sleep 0.5
done

echo ""
Expand Down
7 changes: 5 additions & 2 deletions scripts/saucelabs/wait-tunnel.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

TUNNEL_LOG="$LOGS_DIR/saucelabs-tunnel.log"
WAIT_DELAY=60

# Method that prints the logfile output of the saucelabs tunnel.
printLog() {
Expand All @@ -16,15 +17,17 @@ let "counter=0"
while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do
let "counter++"

if [ $counter -gt 240 ]; then
# Counter needs to be multiplied by two because the while loop only sleeps a half second.
# This has been made in favor of better progress logging (printing dots every half second)
if [ $counter -gt $[${WAIT_DELAY} * 2] ]; then
echo ""
echo "Timed out after 2 minutes waiting for tunnel ready file"
printLog
exit 5
fi

printf "."
sleep .5
sleep 0.5
done

echo ""
Expand Down