use of org.apache.accumulo.fate.zookeeper.ServiceLock in project accumulo by apache.
the class ServiceLockIT method testNoParent.
@Test(timeout = 10000)
public void testNoParent() throws Exception {
var parent = ServiceLock.path("/zltestNoParent-" + this.hashCode() + "-l" + pdCount.incrementAndGet());
ServiceLock zl = getZooLock(parent, UUID.randomUUID());
assertFalse(zl.isLocked());
TestALW lw = new TestALW();
zl.lock(lw, "test1".getBytes(UTF_8));
lw.waitForChanges(1);
assertFalse(lw.locked);
assertFalse(zl.isLocked());
assertNotNull(lw.exception);
assertNull(lw.reason);
}
Aggregations