mirror of https://gitee.com/bigwinds/arangodb
agency test for assigning objects through op set new ttl
This commit is contained in:
parent
220132f5e7
commit
05db051950
|
@ -1339,7 +1339,11 @@ function startInstanceAgency(instanceInfo, protocol, options,
|
|||
addArgs, testname, rootDir) {
|
||||
|
||||
const N = options.agencySize;
|
||||
if (options.agencyWaitForSync === undefined) {
|
||||
options.agencyWaitForSync = true;
|
||||
}
|
||||
const wfs = options.agencyWaitForSync;
|
||||
|
||||
for (let i = 0; i < N; i++) {
|
||||
let instanceArgs = _.clone(addArgs);
|
||||
instanceArgs["agency.id"] = String(i);
|
||||
|
@ -1362,6 +1366,8 @@ function startInstanceAgency(instanceInfo, protocol, options,
|
|||
let dir = fs.join(rootDir, 'agency-' + i);
|
||||
fs.makeDirectoryRecursive(dir);
|
||||
|
||||
console.log("fucks", instanceArgs);
|
||||
|
||||
instanceInfo.arangods.push(startArango(protocol, options, instanceArgs, testname, rootDir));
|
||||
}
|
||||
|
||||
|
|
|
@ -198,6 +198,15 @@ function agencyTestSuite () {
|
|||
assertEqual(readAndCheck([["a/y"]]), [{"a":{"y":12}}]);
|
||||
sleep(1100);
|
||||
assertEqual(readAndCheck([["a/y"]]), [{"a":{"y":12}}]);
|
||||
writeAndCheck([[{"foo/bar":{"op":"set","new":{"baz":12}}}]]);
|
||||
assertEqual(readAndCheck([["/foo/bar/baz"]]), [{"foo":{"bar":{"baz":12}}}]);
|
||||
assertEqual(readAndCheck([["/foo/bar"]]), [{"foo":{"bar":{"baz":12}}}]);
|
||||
assertEqual(readAndCheck([["/foo"]]), [{"foo":{"bar":{"baz":12}}}]);
|
||||
writeAndCheck([[{"foo/bar":{"op":"set","new":{"baz":12},"ttl":1}}]]);
|
||||
sleep(1000);
|
||||
assertEqual(readAndCheck([["/foo"]]), [{"foo":{}}]);
|
||||
assertEqual(readAndCheck([["/foo/bar"]]), [{"foo":{}}]);
|
||||
assertEqual(readAndCheck([["/foo/bar/baz"]]), [{"foo":{}}]);
|
||||
},
|
||||
|
||||
testOpNew : function () {
|
||||
|
|
Loading…
Reference in New Issue