Skip to content

Commit

Permalink
spec: fix random timeouts using a tunnel identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Jan 27, 2014
1 parent c091d86 commit 3db900f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Expand Up @@ -55,8 +55,7 @@ before_script:
- bundle exec rackup -p 9292 &
- sleep 10
- wget http://www.browserstack.com/BrowserStackTunnel.jar
- java -jar BrowserStackTunnel.jar $BS_AUTHKEY localhost,9292,0 &
#- java -jar BrowserStackTunnel.jar -tunnelIdentifier $TRAVIS_JOB_ID $BS_AUTHKEY localhost,9292,0 &
- java -jar BrowserStackTunnel.jar $BS_AUTHKEY localhost,9292,0 -tunnelIdentifier $TRAVIS_JOB_ID &
- sleep 10

script:
Expand Down
9 changes: 5 additions & 4 deletions spec/runner.rb
Expand Up @@ -10,8 +10,9 @@
cap['browser'] = ENV['SELENIUM_BROWSER'] || 'chrome'
cap['browser_version'] = ENV['SELENIUM_VERSION'] if ENV['SELENIUM_VERSION']

cap['browserstack.tunnel'] = 'true'
cap['browserstack.debug'] = 'true'
cap['browserstack.tunnelIdentifier'] = ENV['TRAVIS_JOB_ID']
cap['browserstack.tunnel'] = 'true'
cap['browserstack.debug'] = 'false'

print 'Loading...'

Expand All @@ -35,9 +36,9 @@
end

unless (browser.find_element(:css, '.rspec-report') rescue false)
puts "\rConnection error..."
puts "\rThe specs didn't load."
browser.quit
exit 0
exit 1
end

print "\rRunning specs..."
Expand Down

0 comments on commit 3db900f

Please sign in to comment.