mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
test_rack_handler.rb - try to fix intermittent JRuby CI failures, attempt #2
This commit is contained in:
parent
362b4ac7ad
commit
cc621bca3f
1 changed files with 6 additions and 5 deletions
|
@ -33,21 +33,22 @@ class TestPathHandler < Minitest::Test
|
|||
|
||||
# Wait for launcher to boot
|
||||
Timeout.timeout(10) do
|
||||
sleep 1 until @launcher
|
||||
sleep 0.5 until @launcher
|
||||
end
|
||||
sleep 1.5 unless Puma::IS_MRI
|
||||
|
||||
yield @launcher
|
||||
ensure
|
||||
@launcher.stop if @launcher
|
||||
thread.join if thread
|
||||
thread.join if thread
|
||||
end
|
||||
|
||||
def test_handler_boots
|
||||
host = windows? ? "127.0.1.1" : "0.0.0.0"
|
||||
opts = { Host: host }
|
||||
host = Puma::IS_WINDOWS ? "127.0.0.1" : "0.0.0.0"
|
||||
port = UniquePort.call
|
||||
opts = { Host: host, Port: port }
|
||||
in_handler(app, opts) do |launcher|
|
||||
hit(["http://#{host}:#{ launcher.connected_ports[0] }/test"])
|
||||
hit(["http://#{host}:#{port}/test"])
|
||||
assert_equal("/test", @input["PATH_INFO"])
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue