Skip to content

Commit

Permalink
spec:node: wait until actor comes back after death
Browse files Browse the repository at this point in the history
  • Loading branch information
niamster committed Feb 16, 2015
1 parent b99c21d commit 134bb01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/dcell/node_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ def wait_for_actor(id)
def wait_for_death(time)
sleep time + 1
id = TEST_NODE[:id]
10.times do
30.times do
node = DCell::Node[id]
begin
if node and node.alive? and node[:test_actor].mutable != @unique
return
end
sleep 1
rescue Celluloid::DeadActorError, Celluloid::Task::TerminatedError
return
sleep 1
end
end
raise Exception, "Failed to wait for actor death"
Expand Down

0 comments on commit 134bb01

Please sign in to comment.