[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
- [PATCH 0/8] latest changes in dtas.git (dtas-splitfx), Eric Wong, 2013/09/07
- [PATCH 4/8] test/*: compatibility class for both minitest 4 and 5, Eric Wong, 2013/09/07
- [PATCH 8/8] add dtas-splitfx - .cuesheets + make(1), Eric Wong, 2013/09/07
- [PATCH 1/8] source/sox: correctly extend xs for try_to_fail_harder, Eric Wong, 2013/09/07
- [PATCH 5/8] test/helper: delay at_exit registration for tmpfifo, Eric Wong, 2013/09/07
- [PATCH 3/8] test/player_integration: thread-safety fix,
Eric Wong <=
- [PATCH 2/8] test/*.rb: test/unit compatibility, Eric Wong, 2013/09/07
- [PATCH 6/8] dtas-console: show paused track when paused, Eric Wong, 2013/09/07
- [PATCH 7/8] test/helper: fix var shadowing, Eric Wong, 2013/09/07