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 17, 2015
1 parent bfccd1e commit f7372fb
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

1 comment on commit f7372fb

@byroot
Copy link
Contributor

@byroot byroot commented on f7372fb Sep 17, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

Please sign in to comment.