Skip to content

Commit

Permalink
spec/runner: try to fix some weird tunnel failures
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Feb 6, 2014
1 parent dc146cd commit 6a9c15e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/runner.rb
Expand Up @@ -5,15 +5,17 @@

# setup tunnel
begin
File.open('tunnel.jar', 'w') {|f|
File.open('BrowserStackTunnel.jar', 'w') {|f|
f.write RestClient.get('http://www.browserstack.com/BrowserStackTunnel.jar').to_str
}

tunnel = IO.popen 'java -jar tunnel.jar $BS_AUTHKEY localhost,9292,0 -tunnelIdentifier $TRAVIS_JOB_ID'
tunnel = IO.popen 'java -jar BrowserStackTunnel.jar $BS_AUTHKEY localhost,9292,0 -tunnelIdentifier $TRAVIS_JOB_ID'

loop do
break if tunnel.gets.start_with? 'You can now access'
end
rescue
retry
end

# configure based on environment variables
Expand Down

0 comments on commit 6a9c15e

Please sign in to comment.