mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Updates for non MRI CI stablity [changelog skip] (#2434)
* Actions non MRI - use JDK11 on macOS, add Big Sur * Actions MRI - add macOS Big Sur Ruby 2.7 * test/helper.rb - run setup in same Timeout block as test * TestIntegrationSingle#test_int_refuse - skip on JRuby Seems to intermittently lockup CI * TestLauncher#test_puma_stats - fix intermittent non-MRI failure II * test_out_of_band_server.rb - JRuby - add small sleep after server.run * test_persistent.rb - JRuby - add small sleep after server.run * test_puma_server.rb - JRuby - add small sleep after server.run
This commit is contained in:
parent
852f16a916
commit
c71d149117
8 changed files with 29 additions and 21 deletions
1
.github/workflows/mri.yml
vendored
1
.github/workflows/mri.yml
vendored
|
@ -26,6 +26,7 @@ jobs:
|
||||||
- { os: windows-2019 , ruby: mingw }
|
- { os: windows-2019 , ruby: mingw }
|
||||||
- { os: ubuntu-20.04 , ruby: 2.7 , no-ssl: ' no SSL' }
|
- { os: ubuntu-20.04 , ruby: 2.7 , no-ssl: ' no SSL' }
|
||||||
- { os: windows-2019 , ruby: 2.7 , no-ssl: ' no SSL' }
|
- { os: windows-2019 , ruby: 2.7 , no-ssl: ' no SSL' }
|
||||||
|
- { os: macos-11.0 , ruby: 2.7 }
|
||||||
exclude:
|
exclude:
|
||||||
- { os: ubuntu-20.04 , ruby: 2.2 }
|
- { os: ubuntu-20.04 , ruby: 2.2 }
|
||||||
- { os: ubuntu-20.04 , ruby: 2.3 }
|
- { os: ubuntu-20.04 , ruby: 2.3 }
|
||||||
|
|
20
.github/workflows/non_mri.yml
vendored
20
.github/workflows/non_mri.yml
vendored
|
@ -18,14 +18,14 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-20.04, macos-10.15 ]
|
|
||||||
ruby: [ jruby, jruby-head, truffleruby-head ]
|
|
||||||
no-ssl: ['']
|
|
||||||
include:
|
include:
|
||||||
- { os: ubuntu-20.04 , ruby: jruby-head, allow-failure: true }
|
- { os: ubuntu-20.04 , ruby: jruby }
|
||||||
- { os: ubuntu-20.04 , ruby: jruby, no-ssl: ' no SSL' }
|
- { os: ubuntu-20.04 , ruby: jruby, no-ssl: ' no SSL' }
|
||||||
exclude:
|
- { os: ubuntu-20.04 , ruby: jruby-head, allow-failure: true }
|
||||||
- { os: macos-10.15 , ruby: jruby-head }
|
- { os: ubuntu-20.04 , ruby: truffleruby-head }
|
||||||
|
- { os: macos-11.0 , ruby: jruby }
|
||||||
|
- { os: macos-10.15 , ruby: jruby }
|
||||||
|
- { os: macos-10.15 , ruby: truffleruby-head }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: repo checkout
|
- name: repo checkout
|
||||||
|
@ -39,6 +39,12 @@ jobs:
|
||||||
brew: ragel
|
brew: ragel
|
||||||
mingw: _upgrade_ openssl ragel
|
mingw: _upgrade_ openssl ragel
|
||||||
|
|
||||||
|
- name: set JAVA_HOME
|
||||||
|
if: startsWith(matrix.os, 'macos')
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo JAVA_HOME=$JAVA_HOME_11_X64 >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: bundle install
|
- name: bundle install
|
||||||
run: bundle install --jobs 4 --retry 3
|
run: bundle install --jobs 4 --retry 3
|
||||||
|
|
||||||
|
@ -56,7 +62,7 @@ jobs:
|
||||||
|
|
||||||
- name: test
|
- name: test
|
||||||
id: test
|
id: test
|
||||||
timeout-minutes: 15
|
timeout-minutes: 12
|
||||||
continue-on-error: ${{ matrix.allow-failure || false }}
|
continue-on-error: ${{ matrix.allow-failure || false }}
|
||||||
if: success() # only run if previous steps have succeeded
|
if: success() # only run if previous steps have succeeded
|
||||||
run: bundle exec rake test:all
|
run: bundle exec rake test:all
|
||||||
|
|
|
@ -62,20 +62,15 @@ module TimeoutEveryTestCase
|
||||||
with_info_handler do
|
with_info_handler do
|
||||||
time_it do
|
time_it do
|
||||||
capture_exceptions do
|
capture_exceptions do
|
||||||
before_setup; setup; after_setup
|
::Timeout.timeout(RUBY_ENGINE == 'ruby' ? 45 : 60, TestTookTooLong) do
|
||||||
|
before_setup; setup; after_setup
|
||||||
# wrap timeout around test method only
|
|
||||||
::Timeout.timeout(RUBY_ENGINE == 'ruby' ? 45 : 60, TestTookTooLong) {
|
|
||||||
self.send self.name
|
self.send self.name
|
||||||
}
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Minitest::Test::TEARDOWN_METHODS.each do |hook|
|
capture_exceptions do
|
||||||
capture_exceptions do
|
::Timeout.timeout(RUBY_ENGINE == 'ruby' ? 45 : 60, TestTookTooLong) do
|
||||||
# wrap timeout around teardown methods, remove when they're stable
|
Minitest::Test::TEARDOWN_METHODS.each { |hook| self.send hook }
|
||||||
::Timeout.timeout(RUBY_ENGINE == 'ruby' ? 45 : 60, TestTookTooLong) {
|
|
||||||
self.send hook
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if respond_to? :clean_tmp_paths
|
if respond_to? :clean_tmp_paths
|
||||||
|
|
|
@ -94,6 +94,7 @@ class TestIntegrationSingle < TestIntegration
|
||||||
|
|
||||||
def test_int_refuse
|
def test_int_refuse
|
||||||
skip_unless_signal_exist? :INT
|
skip_unless_signal_exist? :INT
|
||||||
|
skip_on :jruby # seems to intermittently lockup JRuby CI
|
||||||
|
|
||||||
cli_server 'test/rackup/hello.ru'
|
cli_server 'test/rackup/hello.ru'
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -131,9 +131,12 @@ class TestLauncher < Minitest::Test
|
||||||
c.clear_binds!
|
c.clear_binds!
|
||||||
end
|
end
|
||||||
launcher = launcher(conf)
|
launcher = launcher(conf)
|
||||||
launcher.events.on_booted {launcher.stop}
|
launcher.events.on_booted {
|
||||||
|
sleep 1.1 unless Puma.mri?
|
||||||
|
launcher.stop
|
||||||
|
}
|
||||||
launcher.run
|
launcher.run
|
||||||
sleep 2 unless Puma.mri?
|
sleep 1 unless Puma.mri?
|
||||||
Puma::Server::STAT_METHODS.each do |stat|
|
Puma::Server::STAT_METHODS.each do |stat|
|
||||||
assert_includes Puma.stats_hash, stat
|
assert_includes Puma.stats_hash, stat
|
||||||
end
|
end
|
||||||
|
|
|
@ -64,6 +64,7 @@ class TestOutOfBandServer < Minitest::Test
|
||||||
@server.max_threads = options[:max_threads] || 1
|
@server.max_threads = options[:max_threads] || 1
|
||||||
@port = (@server.add_tcp_listener '127.0.0.1', 0).addr[1]
|
@port = (@server.add_tcp_listener '127.0.0.1', 0).addr[1]
|
||||||
@server.run
|
@server.run
|
||||||
|
sleep 0.15 if Puma.jruby?
|
||||||
end
|
end
|
||||||
|
|
||||||
# Sequential requests should trigger out_of_band after every request.
|
# Sequential requests should trigger out_of_band after every request.
|
||||||
|
|
|
@ -27,7 +27,7 @@ class TestPersistent < Minitest::Test
|
||||||
@port = (@server.add_tcp_listener HOST, 0).addr[1]
|
@port = (@server.add_tcp_listener HOST, 0).addr[1]
|
||||||
@server.max_threads = 1
|
@server.max_threads = 1
|
||||||
@server.run
|
@server.run
|
||||||
|
sleep 0.15 if Puma.jruby?
|
||||||
@client = TCPSocket.new HOST, @port
|
@client = TCPSocket.new HOST, @port
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ class TestPumaServer < Minitest::Test
|
||||||
@port = (@server.add_tcp_listener @host, 0).addr[1]
|
@port = (@server.add_tcp_listener @host, 0).addr[1]
|
||||||
@server.early_hints = true if early_hints
|
@server.early_hints = true if early_hints
|
||||||
@server.run
|
@server.run
|
||||||
|
sleep 0.15 if Puma.jruby?
|
||||||
end
|
end
|
||||||
|
|
||||||
def header(sock)
|
def header(sock)
|
||||||
|
|
Loading…
Reference in a new issue