about summary refs log tree commit homepage
path: root/test/player_integration.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-09-06 22:14:38 +0000
committerEric Wong <normalperson@yhbt.net>2013-09-06 22:14:38 +0000
commit610a024097b870afb7ae8c1b9393647e938bea83 (patch)
tree23861fce7eb19884073b08dc1e9a6d15f28ce297 /test/player_integration.rb
parent4d0ed0ea4b53690f55f2638717dbe266ad3c5ff6 (diff)
downloaddtas-610a024097b870afb7ae8c1b9393647e938bea83.tar.gz
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.
Diffstat (limited to 'test/player_integration.rb')
-rw-r--r--test/player_integration.rb6
1 files 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