Skip to content

Commit 46745d1

Browse files
committed
Make sure all processes are terminated when running plugin test
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.
1 parent 9bac666 commit 46745d1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/integration/puma/plugin_test.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,12 @@ class PluginTest < ActiveSupport::TestCase
5252
wait_for_process_termination_with_timeout(@pid)
5353

5454
assert_not process_exists?(@pid)
55+
56+
# Make sure all supervised processes are also terminated
57+
SolidQueue::Process.all.each do |process|
58+
signal_process(process.pid, :KILL) if process_exists?(process.pid)
59+
end
60+
61+
wait_for_registered_processes 0, timeout: 3.second
5562
end
5663
end

0 commit comments

Comments
 (0)