Skip to content

Commit

Permalink
Poll for the server coming up more frequently
Browse files Browse the repository at this point in the history
Capybara.timeout sleeps 50ms between polls, and since the server tends
to boot quickly, this is a reasonable value. By not adding another
500ms, we shave a few seconds off the test execution time, mostly in
spec/server_spec.rb.
  • Loading branch information
joliss committed Jan 3, 2012
1 parent c444d33 commit a52ffd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/capybara/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def boot
end

Capybara.timeout(Capybara.server_boot_timeout) do
if responsive? then true else sleep(0.5) and false end
responsive?
end
end
end
Expand Down

0 comments on commit a52ffd8

Please sign in to comment.