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

8 commits

Author SHA1 Message Date
Artur Montenegro
5a4e744e8a
Prefer rackup file specified by CLI (#2236)
Co-Authored-By: Cristian Rivera <cristian_rivera@me.com>
Co-authored-by: Artur Montenegro <artur.montenegro@tempest.com.br>
Co-authored-by: Nate Berkopec <nate.berkopec@gmail.com>
2020-04-28 08:15:33 +09:00
Andrew Konchin
80b7148b06
Force curl to output error messages in English locale in tests (#2149) (#2153) 2020-03-07 09:57:17 -06:00
Daniel Colson
39d16fadaf Add pumactl command to print thread backtraces (#2054)
* Add pumactl command to print thread backtraces

Completes 1 of 2 items from #1964

This commit adds an endpoint to the status app to print thread
backtraces, and control cli command to call that endpoint.

I tried this locally by starting a server with:

```sh
bundle exec bin/puma test/rackup/hello.ru \
  --control-url="unix://test.sock" \
  --control-token="token"
```

and then printing the backtraces with:

```sh
bundle exec bin/pumactl thread-backtraces \
  --control-url="unix://test.sock" \
  --control-token="token"
```

* Log threads as JSON in control app

With this commit the status app sends the thread backtraces as an array
of objects with `name` and `backtrace` keys, rather than as a string
matching the SIGINFO output.

While working on this I noticed that we logged the thread TID twice.
This commit simplifies that so we only log the thread TID once, with
both the label (I don't know when the label would get set) and name if
they are available.
2019-11-11 13:08:41 +08: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
4cdfb5cd2f
Skip some more invalid JRuby tests 2019-09-19 15:48:16 +02:00
Nate Berkopec
e96e798068
SIGINFO prints thread backtraces (#1320) 2019-09-12 09:59:54 +00:00
Nate Berkopec
7aa77570ed
Remove unnecessary SIGINT trap for Jruby (#1961)
See #1868

The original intent of the trap was to ensure that the socket was removed
properly. It now does, so the trap is no longer necessary.
2019-09-11 16:24:53 +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