use of com.couchbase.client.core.msg.kv.InsertResponse in project couchbase-jvm-clients by couchbase.
the class ObserveIntegrationTest method observesRemove.
@Test
void observesRemove() {
String id = UUID.randomUUID().toString();
InsertResponse insertResponse = performInsert(id);
assertTrue(insertResponse.mutationToken().isPresent());
ObserveContext ctx = new ObserveContext(core.context(), Observe.ObservePersistTo.ACTIVE, Observe.ObserveReplicateTo.NONE, insertResponse.mutationToken(), 0, cid, id, false, env.timeoutConfig().kvTimeout(), null);
Observe.poll(ctx).timeout(MAX_WAIT).block();
RemoveResponse removeResponse = performRemove(id);
assertTrue(insertResponse.mutationToken().isPresent());
ObserveContext ctx2 = new ObserveContext(core.context(), Observe.ObservePersistTo.ACTIVE, Observe.ObserveReplicateTo.NONE, removeResponse.mutationToken(), 0, cid, id, true, env.timeoutConfig().kvTimeout(), null);
Observe.poll(ctx2).timeout(MAX_WAIT).block();
}
use of com.couchbase.client.core.msg.kv.InsertResponse in project couchbase-jvm-clients by couchbase.
the class ObserveIntegrationTest method persistToActive.
@Test
void persistToActive() {
String id = UUID.randomUUID().toString();
InsertResponse insertResponse = performInsert(id);
assertTrue(insertResponse.mutationToken().isPresent());
ObserveContext ctx = new ObserveContext(core.context(), Observe.ObservePersistTo.ACTIVE, Observe.ObserveReplicateTo.NONE, insertResponse.mutationToken(), 0, cid, id, false, env.timeoutConfig().kvTimeout(), null);
Observe.poll(ctx).timeout(MAX_WAIT).block();
}
Aggregations