From 58104628f3b642de802ac2e00854882cd75ebebb Mon Sep 17 00:00:00 2001 From: Nate Berkopec Date: Mon, 11 May 2020 13:21:24 +0900 Subject: [PATCH] Fix a bunch of test warnings --- lib/puma/cli.rb | 2 +- lib/puma/thread_pool.rb | 4 ++-- test/test_integration_single.rb | 2 +- test/test_puma_server.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/puma/cli.rb b/lib/puma/cli.rb index c4aac2be..b53262e9 100644 --- a/lib/puma/cli.rb +++ b/lib/puma/cli.rb @@ -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| diff --git a/lib/puma/thread_pool.rb b/lib/puma/thread_pool.rb index 53e05e0c..c0bbedb1 100644 --- a/lib/puma/thread_pool.rb +++ b/lib/puma/thread_pool.rb @@ -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 diff --git a/test/test_integration_single.rb b/test/test_integration_single.rb index ebe8fa57..35801c53 100644 --- a/test/test_integration_single.rb +++ b/test/test_integration_single.rb @@ -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 diff --git a/test/test_puma_server.rb b/test/test_puma_server.rb index 3179579c..e07abca8 100644 --- a/test/test_puma_server.rb +++ b/test/test_puma_server.rb @@ -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