1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
1. Add racc to Gemfile for JRuby RuboCop
2. test_busy_worker - skip teardown
3. test_integration_single - patch from PR 2560
This commit is contained in:
MSP-Greg 2021-03-02 09:56:11 -06:00 committed by GitHub
parent 7970d14e63
commit a192434909
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 4 deletions

View file

@ -15,6 +15,8 @@ gem "minitest-stub-const"
gem "sd_notify"
gem "jruby-openssl", :platform => "jruby"
# needed for rubocop
gem "racc", :platform => "jruby"
gem "rubocop", "~> 0.58.0"

View file

@ -204,7 +204,7 @@ class TestIntegration < Minitest::Test
args = "-w #{workers} -t 0:5 -q test/rackup/hello_with_delay.ru"
if Puma.windows?
@control_tcp_port = UniquePort.call
cli_server "#{args} --control-url tcp://#{HOST}:#{@control_tcp_port} --control-token #{TOKEN}"
cli_server "--control-url tcp://#{HOST}:#{@control_tcp_port} --control-token #{TOKEN} #{args}"
else
cli_server args
end

View file

@ -9,6 +9,7 @@ class TestBusyWorker < Minitest::Test
end
def teardown
return if skipped?
@server.stop(true) if @server
@ios.each {|i| i.close unless i.closed?}
end

View file

@ -165,9 +165,17 @@ class TestIntegrationSingle < TestIntegration
end
def test_application_logs_are_flushed_on_write
cli_server 'test/rackup/write_to_stdout.ru'
@control_tcp_port = UniquePort.call
cli_server "--control-url tcp://#{HOST}:#{@control_tcp_port} --control-token #{TOKEN} test/rackup/write_to_stdout.ru"
read_body connect
log_line = @server.gets
assert_equal "hello\n", log_line
cli_pumactl 'stop'
assert_equal "hello\n", @server.gets
assert_includes @server.read, 'Goodbye!'
@server.close unless @server.closed?
@server = nil
end
end