mirror of https://gitee.com/bigwinds/arangodb
added 'in'-check for agency precondition
This commit is contained in:
parent
f673b5c5cc
commit
761b16e407
|
@ -352,21 +352,17 @@ bool Store::check(VPackSlice const& slice) const {
|
|||
if (op.value.getBool() ? found : !found) {
|
||||
return false;
|
||||
}
|
||||
} else if (oper == "in") { // isEmpty
|
||||
} else if (oper == "in") { // in
|
||||
if (found) {
|
||||
if (node.slice().isArray()) {
|
||||
for (auto const& elem : VPackArrayIterator(node.slice())) {
|
||||
if (elem == op.value) {
|
||||
for (auto const& i : VPackArrayIterator(node.slice())) {
|
||||
if (i == op.value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -375,7 +371,7 @@ bool Store::check(VPackSlice const& slice) const {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ function agencyTestSuite () {
|
|||
var res = request({url: agencyServers[whoseTurn] + "/_api/agency/config",
|
||||
method: "GET", followRedirects: true, body: "",
|
||||
headers: {"Content-Type": "application/json"}});
|
||||
wait(.25);
|
||||
wait(0.25);
|
||||
res.bodyParsed = JSON.parse(res.body);
|
||||
if (res.bodyParsed.leaderId >= 0 && res.bodyParsed.leaderId < nagents) {
|
||||
whoseTurn = res.bodyParsed.leaderId;
|
||||
|
|
Loading…
Reference in New Issue