Remove broken tests for server_boot_timeout
When they were added in 09d6335
, responsive? already only hit
/__identify__, which does not hit the server, but gets special-cased in
Capybara's Identify server class (and runs instantly).
So it's not clear what constitutes a "slow" server that might time out
at boot, and thus why server_boot_timeout needs to be configurable. A
server that is slow to respond to HTTP requests would not trigger the
boot timeout. All we really seem to be waiting for within the timeout
window is for Thin or WEBrick to come up.
This commit is contained in:
parent
caec8cba50
commit
c444d33631
|
@ -71,29 +71,4 @@ describe Capybara::Server do
|
|||
@server1a.port.should == @server1b.port
|
||||
@server2a.port.should == @server2b.port
|
||||
end
|
||||
|
||||
it "should wait specified time for the app to boot" do
|
||||
pending 'this test does not work: https://groups.google.com/d/msg/ruby-capybara/QrSKTbjh5rY/egvcVFYiWZMJ'
|
||||
|
||||
@slow_app = proc { |env| sleep(1); [200, {}, "Hello Slow Server!"] }
|
||||
|
||||
Capybara.server_boot_timeout = 1.5
|
||||
@server = Capybara::Server.new(@slow_app).boot
|
||||
|
||||
@res = Net::HTTP.start(@server.host, @server.port) { |http| http.get('/') }
|
||||
@res.body.should include('Hello Slow Server')
|
||||
end
|
||||
|
||||
it "should raise an exception if boot timeout is exceeded" do
|
||||
pending 'this test does not work: https://groups.google.com/d/msg/ruby-capybara/QrSKTbjh5rY/egvcVFYiWZMJ'
|
||||
|
||||
@slow_app = proc { |env| sleep(1); [200, {}, "Hello Slow Server!"] }
|
||||
|
||||
Capybara.server_boot_timeout = 0.5
|
||||
server = Capybara::Server.new(@slow_app)
|
||||
server.stub(:exit).and_return(:timeout)
|
||||
server.stub(:puts)
|
||||
server.boot.should == :timeout
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue