Commit 5260612c authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

RSpec tests: terminate HGitaly with SIGTERM

Killing the main process had no other impact on the
worker processes than to orphan them.

Depends on hgitaly#34 for the wished result.

branch : heptapod-stable
parent baa204a5c885
......@@ -218,8 +218,8 @@ def start_hgitaly
# wait() as start_gitaly is doing is to be understood as waiting
# for first response, not process reaping.
# this is a SIGKILL, it's normal not to see anything in the logs
Kernel.at_exit { stop(pid) }
# SIGTERM, HGitaly is supposed to clean up, reap workers etc.
Kernel.at_exit { terminate(pid) }
def gitaly_socket_path
......@@ -259,6 +259,12 @@ def start_gitaly(gitaly_dir)
def terminate(pid)
Process.kill('TERM', pid)
rescue Errno::ESRCH
# The process can already be gone if the test run was INTerrupted.
def stop(pid)
Process.kill('KILL', pid)
rescue Errno::ESRCH
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment