1
0
Fork 0

Make AQL2 test framework work.

This commit is contained in:
Max Neunhoeffer 2014-08-08 15:33:36 +02:00
parent 0fcb8f059e
commit 4037112858
2 changed files with 17 additions and 11 deletions

View File

@ -148,12 +148,20 @@ function getRawQueryResults (query, bindVars) {
////////////////////////////////////////////////////////////////////////////////
function getRawQueryResultsAQL2 (query, bindVars) {
var queryResult = internal.AQL_EXECUTE(query, bindVars, {
count: true,
batchSize : 3000
});
return queryResult.docs;
var queryResult;
if (typeof bindVars == "object") {
queryResult = AQL_EXECUTE(query, bindVars, {
count: true,
batchSize : 3000
});
}
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);
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;

View File

@ -331,10 +331,6 @@ function findTests () {
return fs.join(makePath("js/server/tests"),x);
}).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_client = tests_shell_common.concat(tests_shell_client_only);
foundTests = true;