Commit 40d5485a authored by Stan Hu's avatar Stan Hu

Clean up second Gitaly process in tests

In tests, we spin up a separate Gitaly process for the second shard.  We
need to kill this process too to avoid leaking processes.
parent 8635c0cd
...@@ -203,10 +203,13 @@ module TestEnv ...@@ -203,10 +203,13 @@ module TestEnv
end end
gitaly_pid = Integer(File.read(TMP_TEST_PATH.join('gitaly.pid'))) gitaly_pid = Integer(File.read(TMP_TEST_PATH.join('gitaly.pid')))
gitaly2_pid = Integer(File.read(TMP_TEST_PATH.join('gitaly2.pid')))
praefect_pid = Integer(File.read(TMP_TEST_PATH.join('praefect.pid'))) praefect_pid = Integer(File.read(TMP_TEST_PATH.join('praefect.pid')))
Kernel.at_exit { stop(gitaly_pid) } Kernel.at_exit do
Kernel.at_exit { stop(praefect_pid) } pids = [gitaly_pid, gitaly2_pid, praefect_pid]
pids.each { |pid| stop(pid) }
end
wait('gitaly') wait('gitaly')
wait('praefect') wait('praefect')
......
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