dtas-all
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/8] test/player_integration: thread-safety fix


From: Eric Wong
Subject: [PATCH 3/8] test/player_integration: thread-safety fix
Date: Sat, 7 Sep 2013 20:03:22 +0000

Process.waitall prevents test cases from using multiple threads
(we're already using multiple processes).  We may use
parallelize_me! from minitest in the future.
---
 test/player_integration.rb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/player_integration.rb b/test/player_integration.rb
index 5ca3e43..57ee3af 100644
--- a/test/player_integration.rb
+++ b/test/player_integration.rb
@@ -74,8 +74,10 @@ module PlayerIntegration
   end
 
   def teardown
-    Process.kill(:TERM, @pid) if @pid
-    Process.waitall
+    if @pid
+      Process.kill(:TERM, @pid)
+      Process.waitpid2(@pid)
+    end
     refute File.exist?(@sock_path)
     @state_tmp.close!
     @out.close! if @out
-- 
1.8.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]