Ejemplo n.º 1
0
  public void testLockAndUnlock() {
    skipOnAdminExtensionAbsent();
    ServerAdminApi api = apiOption.get();

    // TODO should we be able to double-lock (as it were)
    assertTrue(api.unlock(testServerId));
    assertTrue(api.unlock(testServerId));
    assertTrue(api.lock(testServerId));
    assertTrue(api.lock(testServerId));
    assertTrue(api.unlock(testServerId));
    assertTrue(api.unlock(testServerId));
  }