You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2019/03/03 05:48:22 UTC
[arrow] branch master updated: ARROW-4704: [GLib][CI] Ensure
killing plasma_store_server
This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 95b33ef ARROW-4704: [GLib][CI] Ensure killing plasma_store_server
95b33ef is described below
commit 95b33efbeae444bbdc7ec932e3ba0f8a319ec2d1
Author: Kouhei Sutou <ko...@clear-code.com>
AuthorDate: Sun Mar 3 14:46:12 2019 +0900
ARROW-4704: [GLib][CI] Ensure killing plasma_store_server
Author: Kouhei Sutou <ko...@clear-code.com>
Closes #3794 from kou/glib-plasma-test and squashes the following commits:
43f19b3d <Kouhei Sutou> Ensure killing plasma_store_server
8022faf0 <Kouhei Sutou> Ensure killing plasma_store_server
---
c_glib/test/helper/plasma-store.rb | 7 +++++++
ruby/red-plasma/test/helper/plasma-store.rb | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/c_glib/test/helper/plasma-store.rb b/c_glib/test/helper/plasma-store.rb
index 30504fb..2964f57 100644
--- a/c_glib/test/helper/plasma-store.rb
+++ b/c_glib/test/helper/plasma-store.rb
@@ -44,6 +44,13 @@ module Helper
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
diff --git a/ruby/red-plasma/test/helper/plasma-store.rb b/ruby/red-plasma/test/helper/plasma-store.rb
index 30504fb..2964f57 100644
--- a/ruby/red-plasma/test/helper/plasma-store.rb
+++ b/ruby/red-plasma/test/helper/plasma-store.rb
@@ -44,6 +44,13 @@ module Helper
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