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 "jruby-openssl", :platform => "jruby"
|
||||
# needed for rubocop
|
||||
gem "racc", :platform => "jruby"
|
||||
|
||||
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"
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue