Implement isAcquiredInThisProcess, else it will always return false
CuratorLock calls isAcquiredInThisProcess and while changing some tests
there were doing activation more than once. This change made this possible.
@@ -451,6 +451,12 @@ public class MockCurator extends Curator {
public void release() {
if (lock != null)
lock.close();
+ lock = null;
+ }
+
+ @Override
+ public boolean isAcquiredInThisProcess() {
+ return lock != null;
}
}
