For the sake of some unit tests I wish to force “Durability requirements failed” error. I am using the couchbase mock utility. I am running locally. I thought I would get the error if I for example did an upsert with options:
{ persist_to: 2, replicate_to: 2 }
But document gets upserted fine without any issues. Is there any way to force this error?
couchbase lib version: 2.0.12
npm version: 2.14.7
node version: 0.12.7
I also can’t seem to force it if I run it locally against my server (1 SSD, 1 node).
var data = {foo: 'bar'};
var key = 'sometestdoc::' + uuid.v4();
bucket.upsert(key, data, {persist_to: 4, replicate_to: 4}, function (err, createdDoc) {
console.dir(err);
console.dir(createdDoc);
bucket.get(key, function(err, qdoc) {
console.dir(err);
console.dir(qdoc);
});
});
Everything works fine.
Couchbase Server Version 3.0.2-1603-rel
Thanks,