1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Fix a bunch of test warnings

This commit is contained in:
Nate Berkopec 2020-05-11 13:21:24 +09:00
parent 72ebf4458b
commit 58104628f3
No known key found for this signature in database
GPG key ID: BDD7A4B8E43906A6
4 changed files with 5 additions and 5 deletions

View file

@ -133,7 +133,7 @@ module Puma
o.on "-f", "--fork-worker=[REQUESTS]", OptionParser::DecimalInteger,
"Fork new workers from existing worker. Cluster mode only",
"Auto-refork after REQUESTS (default 1000)" do |*args|
user_config.fork_worker *args.compact
user_config.fork_worker(*args.compact)
end
o.on "-I", "--include PATH", "Specify $LOAD_PATH directories" do |arg|

View file

@ -337,11 +337,11 @@ module Puma
# Wait for threads to finish without force shutdown.
threads.each(&:join)
else
join = ->(timeout) do
join = ->(inner_timeout) do
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
threads.reject! do |t|
elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
t.join timeout - elapsed
t.join inner_timeout - elapsed
end
end

View file

@ -49,7 +49,7 @@ class TestIntegrationSingle < TestIntegration
cli_server "-C test/config/with_rackup_from_dsl.rb test/rackup/hello.ru"
connection = connect
reply = read_body(connection)
_, status = stop_server
stop_server
assert_match("Hello World", reply)
end

View file

@ -902,7 +902,7 @@ EOF
s2 << "\r\n"
assert_match /204/, s1.gets
assert_match(/204/, s1.gets)
assert IO.select([s2], nil, nil, app_delay), 'timeout waiting for response'
s2_result = begin