1
0
Fork 0

green tests in agencySize 3

This commit is contained in:
Kaveh Vahedipour 2016-06-07 17:16:58 +02:00
parent 1f85b92b73
commit c0204e89d9
2 changed files with 8 additions and 5 deletions

View File

@ -363,7 +363,7 @@ void Agent::run() {
while (!this->isStopping() && size() > 1) { // need only to run in multi-host
if (leading())
_appendCV.wait(500000); // Only if leading
_appendCV.wait(25000); // Only if leading
else
_appendCV.wait(); // Just sit there doing nothing

View File

@ -42,8 +42,8 @@ function agencyTestSuite () {
/// @brief the agency servers
////////////////////////////////////////////////////////////////////////////////
var agencyServers = ARGUMENTS;
var whoseTurn = 0; // used to do round robin on agencyServers
var agencyServers = ARGUMENTS[0].split(" ");
var whoseTurn = 0;
var request = require("@arangodb/request");
@ -53,6 +53,7 @@ function agencyTestSuite () {
var res = request({url: agencyServers[whoseTurn] + "/_api/agency/read", method: "POST",
followRedirects: true, body: JSON.stringify(list),
headers: {"Content-Type": "application/json"}});
res.bodyParsed = JSON.parse(res.body);
return res;
}
@ -62,8 +63,10 @@ function agencyTestSuite () {
// response:
var res = request({url: agencyServers[whoseTurn] + "/_api/agency/write", method: "POST",
followRedirects: true, body: JSON.stringify(list),
headers: {"Content-Type": "application/json"}});
headers: {"Content-Type": "application/json",
"x-arangodb-agency-mode": "waitForCommitted"}});
res.bodyParsed = JSON.parse(res.body);
wait(.1);
return res;
}
@ -100,7 +103,7 @@ function agencyTestSuite () {
////////////////////////////////////////////////////////////////////////////////
testSingleTopLevel : function () {
wait(10);
wait(1);
assertEqual(readAndCheck([["/x"]]), [{}]);
writeAndCheck([[{x:12}]]);
assertEqual(readAndCheck([["/x"]]), [{x:12}]);