Skip to content

Commit

Permalink
wait for child proces to die before re-acquiring resource
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie Somerville committed Sep 18, 2015
1 parent 390cca9 commit be4e881
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/resource_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit be4e881

Please sign in to comment.