mirror of
https://github.com/postgresml/pgcat.git
synced 2026-03-23 01:16:30 +00:00
Fix code coverage + less flakiness (#318)
Code coverage logic was missing coverage from rust tests. This is now fixed. Also, we weren't reaping spawned PgCat processes correctly which left zombie processes.
This commit is contained in:
committed by
GitHub
parent
f1265a5570
commit
bf6efde8cc
@@ -8,7 +8,11 @@ class PgcatProcess
|
||||
attr_reader :pid
|
||||
|
||||
def self.finalize(pid, log_filename, config_filename)
|
||||
`kill #{pid}` if pid
|
||||
if pid
|
||||
Process.kill("TERM", pid)
|
||||
Process.wait(pid)
|
||||
end
|
||||
|
||||
File.delete(config_filename) if File.exist?(config_filename)
|
||||
File.delete(log_filename) if File.exist?(log_filename)
|
||||
end
|
||||
@@ -77,8 +81,8 @@ class PgcatProcess
|
||||
def stop
|
||||
return unless @pid
|
||||
|
||||
`kill #{@pid}`
|
||||
sleep 0.1
|
||||
Process.kill("TERM", @pid)
|
||||
Process.wait(@pid)
|
||||
@pid = nil
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user