test/helper/plasma-store.rb in red-plasma-0.12.0 vs test/helper/plasma-store.rb in red-plasma-0.13.0
- old
+ new
@@ -42,9 +42,16 @@
end
def stop
return if @pid.nil?
Process.kill(:TERM, @pid)
+ timeout = 1
+ limit = Time.now + timeout
+ while Time.now < limit
+ return if Process.waitpid(@pid, Process::WNOHANG)
+ sleep(0.1)
+ end
+ Process.kill(:KILL, @pid)
Process.waitpid(@pid)
end
end
end