From f7372fba4e94366f61fc1ec6e2cccdc1bf9265b6 Mon Sep 17 00:00:00 2001 From: Charlie Somerville Date: Thu, 17 Sep 2015 15:38:24 +1000 Subject: [PATCH] wait for child proces to die before re-acquiring resource --- test/resource_test.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/resource_test.rb b/test/resource_test.rb index def49f093..b1909c19d 100644 --- a/test/resource_test.rb +++ b/test/resource_test.rb @@ -117,10 +117,9 @@ def test_acquire_releases_on_kill end Process.kill("KILL", pid) + Process.waitpid(pid) resource.acquire { acquired = true } assert acquired - - Process.wait ensure FileUtils.rm_f(path) if path end