Commit d96ffaf2 authored by Kamil Trzciński's avatar Kamil Trzciński

Fix flaky mixins

This improves `Process.kill` (a way to ensure
that we always cleanup after ourselves)
to be prepared to process existing earlier.
parent 3de8edb5
......@@ -40,7 +40,10 @@ describe Gitlab::Cluster::Mixins::PumaCluster do
yield(process.pid)
ensure
Process.kill(:KILL, process.pid) unless process.eof?
begin
Process.kill(:KILL, process.pid)
rescue Errno::ESRCH
end
end
end
end
......
......@@ -54,7 +54,10 @@ describe Gitlab::Cluster::Mixins::UnicornHttpServer do
yield(process.pid)
ensure
Process.kill(:KILL, process.pid) unless process.eof?
begin
Process.kill(:KILL, process.pid)
rescue Errno::ESRCH
end
end
end
end
......
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