use of com.couchbase.client.test.IgnoreWhen in project couchbase-jvm-clients by couchbase.
the class KeyValueErrorIntegrationTest method verifyGetAndLockDoubleLock.
/**
* The mock still returns tmpfail but we want to check that the rerty reason is actually locked as it should
* be post 5.0.
*/
@Test
@IgnoreWhen(clusterTypes = ClusterType.MOCKED)
void verifyGetAndLockDoubleLock() {
String validId = UUID.randomUUID().toString();
collection.upsert(validId, JsonObject.create());
collection.getAndLock(validId, Duration.ofSeconds(5));
TimeoutException exception = assertThrows(TimeoutException.class, () -> collection.getAndLock(validId, Duration.ofSeconds(5), getAndLockOptions().timeout(Duration.ofSeconds(1))));
assertTrue(exception.context().requestContext().retryReasons().contains(RetryReason.KV_LOCKED));
}
use of com.couchbase.client.test.IgnoreWhen in project couchbase-jvm-clients by couchbase.
the class SubdocMutateIntegrationTest method upsertExpandMacroXattr.
@Test
@IgnoreWhen(clusterTypes = { ClusterType.MOCKED })
void upsertExpandMacroXattr() {
JsonObject updatedContent = checkSingleOpSuccessXattr(JsonObject.create(), Arrays.asList(MutateInSpec.insert("x.foo", MutateInMacro.CAS).xattr()));
assertNotEquals("${Mutation.CAS}", updatedContent.getString("foo"));
}
use of com.couchbase.client.test.IgnoreWhen in project couchbase-jvm-clients by couchbase.
the class SubdocMutateIntegrationTest method replaceStringXattr.
@Test
@IgnoreWhen(clusterTypes = ClusterType.CAVES)
void replaceStringXattr() {
JsonObject updatedContent = checkSingleOpSuccessXattr(JsonObject.create().put("foo", "bar"), Arrays.asList(MutateInSpec.replace("x.foo", "bar2").xattr()));
assertEquals("bar2", updatedContent.getString("foo"));
}
use of com.couchbase.client.test.IgnoreWhen in project couchbase-jvm-clients by couchbase.
the class SubdocMutateIntegrationTest method insertExpandMacroCRC32Xattr.
@Test
@IgnoreWhen(clusterTypes = { ClusterType.MOCKED })
void insertExpandMacroCRC32Xattr() {
JsonObject updatedContent = checkSingleOpSuccessXattr(JsonObject.create(), Arrays.asList(MutateInSpec.insert("x.foo", MutateInMacro.VALUE_CRC_32C).xattr()));
assertNotEquals(MutateInMacro.VALUE_CRC_32C.value(), updatedContent.getString("foo"));
}
use of com.couchbase.client.test.IgnoreWhen in project couchbase-jvm-clients by couchbase.
the class SubdocMutateIntegrationTest method replaceBodyWithXattrWithDurability.
@IgnoreWhen(missesCapabilities = { Capabilities.SUBDOC_REVIVE_DOCUMENT })
@Test
void replaceBodyWithXattrWithDurability() {
String id = UUID.randomUUID().toString();
MutationResult mr = coll.mutateIn(id, Arrays.asList(MutateInSpec.upsert("txn", JsonObject.create()).xattr().createPath()), mutateInOptions().accessDeleted(true).createAsDeleted(true).durability(DurabilityLevel.MAJORITY).storeSemantics(StoreSemantics.INSERT));
coll.mutateIn(id, Arrays.asList(MutateInSpec.remove("txn").xattr()), mutateInOptions().accessDeleted(true).durability(DurabilityLevel.MAJORITY).storeSemantics(StoreSemantics.REVIVE));
}
Aggregations