Jobs still occasionally freeze/time-out in test step.
1. Allows jruby-head to fail (as done previously)
2. Actions - change all Ubuntu JRuby OS's to 20.04 (18.04 uses JDK-8, 20.04 uses JDK-11)
3. Integration tests (cluster, pumactl, single) - only run parallel on MRI Rubies
4. `helper.rb` - `TestSkips` - add `JRUBY_HEAD` constant for use with non-parallel conditionals and skips
5. `test_puma_server.rb` - jruby-head - run non-parallel
6. `test_puma_server_ssl.rb` - `TestPumaServerSSLClient` tests - non-parallel on JRuby, add `Errno::ECONNRESET` to client net/https rescue for TruffleRuby
7. `test_puma_server_ssl.rb` - `TestPumaServerSSL#test_http_rejection` - add `Net::ReadTimeout` to client net/https rescue for TruffleRuby
Update test_puma_server_ssl.rb
With an apparently busy Actions macOS runner, the whole test took 10.3 sec, restart took 6.8. Normal runs take 3 sec or less.
Allow macOS test 3 more seconds to complete
macOS CI intermittently fails, times were ~ 6.5 to 8.0 sec, see:
https://github.com/puma/puma/runs/1083927456#step:7:435
Hopefully, the server is taking a while to start, so moving the time of start to after it's booted will stop the failures.
* Support skip_on :truffleruby
* Remove unused variable declaration
* Properly skip tests which need fork
* Improve NO_FORK_MSG
* Keep the Tempfile instances alive in test_redirect_io.rb
* Otherwise they could GC in the middle of the test, and the files could
then be deleted.
* Use a better way to find a free port
* Read directly from the socket in #read_and_drop
* There is no point to decode the bytes since we are closing the socket
in Puma::MiniSSL::Socket#close.
* Also, calling #engine_read_all might cause further SSL errors, which
could hide the first SSL error. This notably happens in
TestPumaServerSSLClient#test_verify_fail_if_no_client_cert
if the server is faster than the client. The error in that case is
"System error: Success - 0 (Puma::MiniSSL::SSLError)" which is not
actually an error, but there is also nothing to read further from SSL.
* TruffleRuby should pass the CI now, remove from allowed failures
* Use a timeout of 120 for all non-MRI implementations
* 60 doesn't seem enough in CI for TestThreadPool#test_trim on TruffleRuby.
* Fix check for cluster mode in integration tests
* Improve integration tests to fail more clearly if the pid file does not exist
* Make integration tests more robust
* Add skips for unreliable or racy tests
* Add ChangeLog entry
* No need to run RuboCop on non-MRI implementations
* This should speed up CI a bit for those jobs.
* Update test_integration files per PR #1956
test_integration_cluster.rb
Request handling during server TERM - two tests
`#test_term_closes_listeners_tcp`
`#test_term_closes_listeners_unix`
using `#term_closes_listeners`
Send requests 10 per second. Send 10, then :TERM server, then send another 30.
No more than 10 should throw Errno::ECONNRESET.
Request handling during phased restart - two tests
`#test_usr1_all_respond_tcp`
`#test_usr1_all_respond_unix`
using `#usr1_all_respond`
Send requests 1 per second. Send 1, then :USR1 server, then send another 24.
All should be responded to, and at least three workers should be used
Stuck worker tests - two tests
`#test_stuck_external_term_spawn`
Tests whether externally TERM'd 'stuck' workers are proper re-spawned.
`#test_stuck_phased_restart`
Tests whether 'stuck' workers are properly shutdown during phased-restart.
helper files/methods changes
1. helper file changes to allow binding to TCP or UNIX, see kwarg unix:
2. Skip on Windows for signal TERM
* Misc updates, debug output, cleanup
* Add comments
* fix test_int_signal_with_background_thread_in_jruby per review
* TestIntegrationCluster#term_closes_listeners - add interleaved assert
* cluster.rb - remove duplicate Worker#term? method