-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration test for Puma worker reaping
This test ensures that Puma handles the `Process.detach` bug described in https://bugs.ruby-lang.org/issues/19837.
- Loading branch information
Showing
2 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
worker_shutdown_timeout 0 | ||
|
||
before_fork do | ||
pid = fork do | ||
sleep 30 # This has to exceed the test timeout | ||
end | ||
|
||
pid_filename = File.join(Dir.tmpdir, 'process_detach_test.pid') | ||
File.write(pid_filename, pid) | ||
Process.detach(pid) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters