Skip to content

Commit f7372fb

Browse files
author
Charlie Somerville
committed
wait for child proces to die before re-acquiring resource
1 parent bfccd1e commit f7372fb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/resource_test.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,9 @@ def test_acquire_releases_on_kill
117117
end
118118

119119
Process.kill("KILL", pid)
120+
Process.waitpid(pid)
120121
resource.acquire { acquired = true }
121122
assert acquired
122-
123-
Process.wait
124123
ensure
125124
FileUtils.rm_f(path) if path
126125
end

0 commit comments

Comments
 (0)