1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
Commit graph

22 commits

Author SHA1 Message Date
MSP-Greg
aec9fb315a
[CI] Update actions, fix intermittent test error (#2801)
* Update Actions

* TestIntegrationPumactl#test_phased_restart_cluster - time to 6

Fixes rare failures on Ubuntu 18.04
2022-01-17 09:07:57 -06:00
MSP-Greg
51ea1b44ea
Update helper.rb TestSkips, add HAS_UNIX_SOCKET to puma.rb [changelog skip] (#2576)
* Update helper.rb TestSkips, add HAS_UNIX_SOCKET to puma.rb

* Tests - skip updates

* test_integration_cluster.rb - fix some test warnings & RuboCop
2021-03-15 08:10:43 -06:00
MSP-Greg
1f93fd44f5
Fix-up test_refork, hot_restart_does_not_drop_connections [changelog skip] (#2441)
* Fix-up test_refork, hot_restart_does_not_drop_connections

* Tests - fix two 'warning: assigned but unused variable'
2020-10-22 13:54:57 -06:00
MSP-Greg
03c3b2f0e1 Improve reliability of non-MRI CI
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
2020-10-14 21:37:45 -05:00
MSP-Greg
67c686afa6
Add hot_restart_does_not_drop_connections tests
Co-authored-by: Chris LaRose <cjlarose@gmail.com>
2020-10-12 17:20:06 -05:00
Nate Berkopec
78b3ca7352
Revert "Consolidate option handling in Server, Server small refactors, doc changes (#2373)"
This reverts commit bbbdfb8f4c.
2020-09-28 09:12:14 -06:00
MSP-Greg
bbbdfb8f4c
Consolidate option handling in Server, Server small refactors, doc changes (#2373)
* Update runner.rb

* Update server.rb

* Update test_busy_worker.rb

* Update test_out_of_band_server.rb

* Update test_persistent.rb

* Update test_puma_server.rb

* test_pumactl.rb - Fix CI warning: assigned but unused variable

* test_integration_pumactl.rb - Fix CI warning: assigned but unused variable

* Update History.md
2020-09-23 08:28:23 -06:00
MSP-Greg
c38d52e0ce
test_integration_pumactl.rb - adjust test_phased_restart_cluster for Darwin
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
2020-09-09 22:24:48 -05:00
MSP-Greg
a7ceb9cc0b
test_integration_pumactl.rb - adjust test_phased_restart_cluster
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.
2020-09-08 15:24:34 -05:00
Nate Berkopec
71c6cd265b
Merge pull request #2306 from alexeevit/feature/use-tempfile-for-state-sock-files
Use Tempfile for sockets and state files in tests
2020-09-08 12:49:04 -07:00
Alexander Popov
39f9c72d93
Fix recursive prune_bundler
Resolve #2319
2020-07-27 15:02:11 +03:00
Vyacheslav Alexeev
a7455dff86 Add tmp_path manager module 2020-07-12 20:00:29 +03:00
Vyacheslav Alexeev
394c28f23f tmp_path 2020-07-06 15:10:55 +03:00
Will Jordan
55a9864eaf Fix errors on test_halt_unix
Prevent `IOError: closed stream` by stopping control during halt.
Add test assertion to ensure no errors in stderr output.
2020-05-19 11:32:02 -07:00
Will Jordan
67f9b1f3f2
Faster phased restart and worker timeout 2020-04-15 08:56:43 +09:00
Benoit Daloze
0b737cce42
Run tests on TruffleRuby, all tests pass now (#2198)
* 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.
2020-03-25 06:13:31 +09:00
Nate Berkopec
a4b8857c04
More Jruby test skips 2020-03-14 09:52:52 -06:00
Will Jordan
964747031f
Refactor listener closing code (#2112)
* Simplify Runner#start_control URL parsing
Reuse logic from Binder#parse.

* Parameterize log message

* Ensure control server Unix socket is closed on shutdown
Remove Binder#close_unix_paths

Co-authored-by: Nate Berkopec <nate.berkopec@gmail.com>
2020-03-03 14:09:08 -06:00
MSP-Greg
4c8d4d6921 Update test_integration files per PR #1956 (#1965)
* 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
2019-09-19 19:37:53 +02:00
Nate Berkopec
ddc1d8d860
It would help if I actually commented it out... 2019-09-11 15:23:15 +00:00
Nate Berkopec
2ae66ce61c
Add ignored assertion (#1960)
* Add ignored assertion

* Add Greg's skip-port-3307 patch
2019-09-11 15:14:11 +00:00
Nate Berkopec
5bf037d616
Split integration tests into three files (#1959)
* Fix mismatched indent

* Split integration into 3 files
2019-09-11 14:22:29 +00:00