From fbedef35186609f9e1cdedaa3a9d2a016423fe82 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 7 Jan 2011 11:55:12 -0800 Subject: test_isolate: prevent concurrent execution I realize this lock overly covers different versions of Ruby, but it's simple and we don't need to invoke isolate too often (we hope). --- t/test_isolate.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/test_isolate.rb b/t/test_isolate.rb index a97417c..c8a88fa 100644 --- a/t/test_isolate.rb +++ b/t/test_isolate.rb @@ -13,6 +13,8 @@ opts = { old_out = $stdout.dup $stdout.reopen($stderr) +lock = File.open(__FILE__, "rb") +lock.flock(File::LOCK_EX) Isolate.now!(opts) do gem 'rack', '1.2.1' gem 'kgio', '2.1.1' -- cgit v1.2.3-24-ge0c7