mirror of https://gitee.com/bigwinds/arangodb
Make AQL2 test framework work.
This commit is contained in:
parent
0fcb8f059e
commit
4037112858
|
@ -148,12 +148,20 @@ function getRawQueryResults (query, bindVars) {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
function getRawQueryResultsAQL2 (query, bindVars) {
|
function getRawQueryResultsAQL2 (query, bindVars) {
|
||||||
var queryResult = internal.AQL_EXECUTE(query, bindVars, {
|
var queryResult;
|
||||||
count: true,
|
if (typeof bindVars == "object") {
|
||||||
batchSize : 3000
|
queryResult = AQL_EXECUTE(query, bindVars, {
|
||||||
});
|
count: true,
|
||||||
|
batchSize : 3000
|
||||||
return queryResult.docs;
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
queryResult = AQL_EXECUTE(query, {}, {
|
||||||
|
count: true,
|
||||||
|
batchSize : 3000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return queryResult.json;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -198,7 +206,9 @@ function getQueryResults2 (query, bindVars, recursive) {
|
||||||
var result2 = getQueryResultsAQL2(query, bindVars, recursive);
|
var result2 = getQueryResultsAQL2(query, bindVars, recursive);
|
||||||
|
|
||||||
if (! _.isEqual(result, result2)) {
|
if (! _.isEqual(result, result2)) {
|
||||||
throw "Old and new AQL return different results!";
|
require("internal").print("Old and new AQL return different results!");
|
||||||
|
require("internal").print("Old result:\n", result);
|
||||||
|
require("internal").print("New result:\n", result2);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -331,10 +331,6 @@ function findTests () {
|
||||||
return fs.join(makePath("js/server/tests"),x);
|
return fs.join(makePath("js/server/tests"),x);
|
||||||
}).sort();
|
}).sort();
|
||||||
|
|
||||||
|
|
||||||
require("internal").print(tests_shell_server_aql);
|
|
||||||
require("internal").print(tests_shell_server_aql_extended);
|
|
||||||
|
|
||||||
tests_shell_server = tests_shell_common.concat(tests_shell_server_only);
|
tests_shell_server = tests_shell_common.concat(tests_shell_server_only);
|
||||||
tests_shell_client = tests_shell_common.concat(tests_shell_client_only);
|
tests_shell_client = tests_shell_common.concat(tests_shell_client_only);
|
||||||
foundTests = true;
|
foundTests = true;
|
||||||
|
|
Loading…
Reference in New Issue