Skip to content

Commit

Permalink
ci: shorter wait timeout for saucelabs and browserstack (#6317)
Browse files Browse the repository at this point in the history
* Changes the wait timeout for Saucelabs and Browserstack from 2 minutes to 1 minute. This is possible now because if the timeout fails we still re-try to create a connection a second time.
  • Loading branch information
devversion authored and mmalerba committed Aug 7, 2017
1 parent 4851dea commit 0680774
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
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

0 comments on commit 0680774

Please sign in to comment.