jnicklas/capybara — pull request #920 by jdelStrother (2012-12-26 17:17:17+00:00)
Title: Fix random timeouts during Server#boot

Rack::Handler::Thin.run() (and, by extension, Capybara.server.call())
can return immediately if another Thin handler is already running. This
results in a race condition where @server_thread can finish running
before we evaluate `responsive?`. The easiest solution seems to be to
just remove the check that @server_thread is alive - it's quite possible
that EventMachine has merged the new server into a previous one, so we don't
particularly care about the state of our own thread.

---

I was having trouble running Capybara's tests successfully - I would keep getting timeout errors while booting, particularly in current_url_spec.rb and server_spec.rb (both of which create multiple Capybara::Servers), and eventually traced it down to this. Has anyone else had trouble with that or is it just me?