Permalink
Browse files

Don't check connection state in Locker#assert!

Rely on the call to zk.exists? to check that
  • Loading branch information...
1 parent 463a10d commit d4bcfa655f7266053a199f176443d055a0017f6f @eric eric committed Mar 1, 2014
Showing with 0 additions and 1 deletion.
  1. +0 −1 lib/zk/locker/locker_base.rb
@@ -277,7 +277,6 @@ def wait_until_blocked(timeout=nil)
def assert!
@mutex.synchronize do
raise LockAssertionFailedError, "have not obtained the lock yet" unless locked?
- raise LockAssertionFailedError, "not connected" unless zk.connected?
raise LockAssertionFailedError, "lock_path was #{lock_path.inspect}" unless lock_path
raise LockAssertionFailedError, "the lock path #{lock_path} did not exist!" unless zk.exists?(lock_path)
raise LockAssertionFailedError, "the parent node was replaced!" unless root_lock_path_same?

0 comments on commit d4bcfa6

Please sign in to comment.