Search in sources :

Example 11 with SingleNodeUpdateResponse

use of com.palantir.atlasdb.timelock.api.SingleNodeUpdateResponse in project atlasdb by palantir.

the class DisabledNamespacesTest method disableFailsIfAlreadyDisabledWithDifferentId.

@Test
public void disableFailsIfAlreadyDisabledWithDifferentId() {
    SingleNodeUpdateResponse firstResponse = disabledNamespaces.disable(disableNamespacesRequest(FIRST));
    assertThat(firstResponse).isEqualTo(successfulResponse());
    SingleNodeUpdateResponse secondResponse = disabledNamespaces.disable(DisableNamespacesRequest.of(ImmutableSet.of(FIRST), "otherLockId"));
    assertThat(secondResponse).isEqualTo(unsuccessfulResponse());
}
Also used : SingleNodeUpdateResponse(com.palantir.atlasdb.timelock.api.SingleNodeUpdateResponse) Test(org.junit.Test)

Aggregations

SingleNodeUpdateResponse (com.palantir.atlasdb.timelock.api.SingleNodeUpdateResponse)11 Test (org.junit.Test)9 ImmutableSingleNodeUpdateResponse (com.palantir.atlasdb.timelock.api.ImmutableSingleNodeUpdateResponse)5 Namespace (com.palantir.atlasdb.timelock.api.Namespace)5 DisableNamespacesResponse (com.palantir.atlasdb.timelock.api.DisableNamespacesResponse)3 SuccessfulDisableNamespacesResponse (com.palantir.atlasdb.timelock.api.SuccessfulDisableNamespacesResponse)3 UnsuccessfulDisableNamespacesResponse (com.palantir.atlasdb.timelock.api.UnsuccessfulDisableNamespacesResponse)3 ReenableNamespacesRequest (com.palantir.atlasdb.timelock.api.ReenableNamespacesRequest)2 ReenableNamespacesResponse (com.palantir.atlasdb.timelock.api.ReenableNamespacesResponse)2 SuccessfulReenableNamespacesResponse (com.palantir.atlasdb.timelock.api.SuccessfulReenableNamespacesResponse)2 UnsuccessfulReenableNamespacesResponse (com.palantir.atlasdb.timelock.api.UnsuccessfulReenableNamespacesResponse)2 DisableNamespacesRequest (com.palantir.atlasdb.timelock.api.DisableNamespacesRequest)1 DisabledNamespacesUpdaterService (com.palantir.atlasdb.timelock.api.DisabledNamespacesUpdaterService)1