}
@Test
public void testSafeModeCache() throws KeeperException, InterruptedException {
String safemodePath = ZookeeperPathConstants.getSafemodePath(DEFAULT);
ZooKeeperLockManager zooKeeperLockManager = new ZooKeeperLockManager(zooKeeper1, safemodePath);
zooKeeperLockManager.lock(DEFAULT);
new WaitForAnswerToBeCorrect(20L) {
@Override
public Object run() {
return clusterStatus2.isInSafeMode(false, DEFAULT);
}
}.test(true);
zooKeeperLockManager.unlock(DEFAULT);
new WaitForAnswerToBeCorrect(20L) {
@Override
public Object run() {
return clusterStatus2.isInSafeMode(false, DEFAULT);
}