New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_integration.rb - cleanup, try removing log output on unneeded 'forked' servers #1925
Conversation
Yeah it's more just the ugliness than the actual correctness that inspired that TODO |
This is a little too parallel with my existing integration cleanup PR. I'm going to prioritize that one. I just have to figure out why it's not working on Linux. |
test_phased_restart_via_pumactl - added timer to verify correct worker shutdown timing
8476229
to
d6c017b
Compare
I just pushed what I can do with this. I saw your integration_cleanup branch, and tried working with it, but starting with something that's broken can be nonproductive. Also, the differences between Ubuntu & macOS are beyond my pay grade... When you asked for changes in test_integration.rb on PR #1908, I decided to add some of things I had done with your branch, and this is the result of that.
Hence, feel free to use whatever. Some of the code I added (like I'm pissed about the macOS intermittent failures. I think we're all tired of the need to look at test logs due to test stability issues... |
…re cleanup 1. test_pumactl_phased_restart_cluster uses CLI pumaclt, but no longer checks based on stuck workers 2. When appropriate, run ControlCLI from CLI/popen and account for bundler 3. Renamed several tests 4. Added two common methods, #cli_pumactl and #get_worker_pids 5. Set worker number as a constant, as GitHub Actions may allow more than 2
While AFK, had a few thoughts, and I think that with the 2nd commit, this is similar to what you're looking for. Many of the tests here are end-to-end, maybe a few should move elsewhere, like the 'stuck_workers' tests. Some of the common methods may be applicable to other test files. I'll probably jinx it by mentioning it, but the macOS jobs have been passing & stable in my fork while working on the 2nd commit... |
Cool! There's some things you were doing in here that I prefer, I just need to sit down and "merge" the two PRs so they're just the way I like. |
Cool. I added one more commit that adds another 'shared method'... Now I'm really finished. Please give some thought to moving some of these tests to a I think integration should test if pumactl and signals are generating the correct actions in Puma, but the tests that check whether cluster.rb is actually handling timing, TERM vs KILL, etc might be better placed elsewhere... |
Errors in Travis 3783 fixed by PR #1932 |
Merged w/ 9efee4e |
Commit 'test_integration.rb - minor code clean up' - cleans up file, no real changes
Commit 'start_forked_server => server.pid ?' - stop forking servers, trying to eliminate log output. There are some retries that may indicate issues.
And yes,
#test_sigterm_closes_listeners_on_forked_servers
still intermittently fails, usually on macOS jobs.Regarding instance variables in setup, Minitest runs every test in a new instance. Hence, creating strings, etc really shouldn't be considered bad. Removed all the past object code, so objects are only created as needed.