diff --git a/scripts/browserstack/waitfor_tunnel.sh b/scripts/browserstack/waitfor_tunnel.sh index a603a317b066..cb2e7d15324c 100755 --- a/scripts/browserstack/waitfor_tunnel.sh +++ b/scripts/browserstack/waitfor_tunnel.sh @@ -2,18 +2,18 @@ # Wait for Connect to be ready before exiting -# Time out if we wait for more than 2 minutes, so that we can print logs. +# Time out if we wait for more than 2 minutes, so the process won't run forever. let "counter=0" while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do let "counter++" + if [ $counter -gt 240 ]; then - echo "Timed out after 2 minutes waiting for browser provider ready file" - # We must manually print logs here because travis will not run - # after_script commands if the failure occurs before the script - # phase. - ./scripts/ci/print-logs.sh + echo + echo "Timed out after 2 minutes waiting for tunnel ready file" exit 5 fi + + printf "." sleep .5 done diff --git a/scripts/sauce/sauce_connect_block.sh b/scripts/sauce/sauce_connect_block.sh index 7aa105032eda..4a519d288111 100755 --- a/scripts/sauce/sauce_connect_block.sh +++ b/scripts/sauce/sauce_connect_block.sh @@ -2,9 +2,24 @@ # Wait for Connect to be ready before exiting echo "Connecting to Sauce Labs" + + +# Wait for Saucelabs Connect to be ready before exiting +# Time out if we wait for more than 2 minutes, so the process won't run forever. +let "counter=0" + while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do + let "counter++" + + if [ $counter -gt 240 ]; then + echo + echo "Timed out after 2 minutes waiting for tunnel ready file" + exit 5 + fi + printf "." sleep .5 done + echo echo "Connected"