Skip to content

Commit

Permalink
Make sure all processes are terminated when running plugin test
Browse files Browse the repository at this point in the history
Otherwise there might be a process that remains as an orphan after the
test finishes if it didn't have time to realise the supervisor is gone.
This messes with all tests run afterwards.
  • Loading branch information
rosa committed Sep 9, 2024
1 parent 9bac666 commit 46745d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/integration/puma/plugin_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,12 @@ class PluginTest < ActiveSupport::TestCase
wait_for_process_termination_with_timeout(@pid)

assert_not process_exists?(@pid)

# Make sure all supervised processes are also terminated
SolidQueue::Process.all.each do |process|
signal_process(process.pid, :KILL) if process_exists?(process.pid)
end

wait_for_registered_processes 0, timeout: 3.second
end
end

0 comments on commit 46745d1

Please sign in to comment.