mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Fix CI (#2561)
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:
parent
7970d14e63
commit
a192434909
4 changed files with 15 additions and 4 deletions
2
Gemfile
2
Gemfile
|
@ -15,6 +15,8 @@ gem "minitest-stub-const"
|
||||||
gem "sd_notify"
|
gem "sd_notify"
|
||||||
|
|
||||||
gem "jruby-openssl", :platform => "jruby"
|
gem "jruby-openssl", :platform => "jruby"
|
||||||
|
# needed for rubocop
|
||||||
|
gem "racc", :platform => "jruby"
|
||||||
|
|
||||||
gem "rubocop", "~> 0.58.0"
|
gem "rubocop", "~> 0.58.0"
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,7 @@ class TestIntegration < Minitest::Test
|
||||||
args = "-w #{workers} -t 0:5 -q test/rackup/hello_with_delay.ru"
|
args = "-w #{workers} -t 0:5 -q test/rackup/hello_with_delay.ru"
|
||||||
if Puma.windows?
|
if Puma.windows?
|
||||||
@control_tcp_port = UniquePort.call
|
@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
|
else
|
||||||
cli_server args
|
cli_server args
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,6 +9,7 @@ class TestBusyWorker < Minitest::Test
|
||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
|
return if skipped?
|
||||||
@server.stop(true) if @server
|
@server.stop(true) if @server
|
||||||
@ios.each {|i| i.close unless i.closed?}
|
@ios.each {|i| i.close unless i.closed?}
|
||||||
end
|
end
|
||||||
|
|
|
@ -165,9 +165,17 @@ class TestIntegrationSingle < TestIntegration
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_application_logs_are_flushed_on_write
|
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
|
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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue