1
0
Fork 0

Fix resilience tests

This commit is contained in:
Andreas Streichardt 2016-09-06 16:44:13 +02:00
parent 6396ac4dc7
commit 7b4a383877
3 changed files with 10 additions and 4 deletions

View File

@ -486,7 +486,7 @@ bool State::loadOrPersistConfiguration() {
result.length()) { // We already have a persisted conf
try {
LOG(WARN) << result[0].toJson();
LOG_TOPIC(DEBUG, Logger::AGENCY) << "Merging configuration " << result[0].toJson();
_agent->mergeConfiguration(result[0]);
} catch (std::exception const& e) {
LOG_TOPIC(ERR, Logger::AGENCY)

View File

@ -1165,10 +1165,12 @@ size_t ClusterComm::performRequests(std::vector<ClusterCommRequest>& requests,
return 0;
}
#if 0
commented out as it break resilience tests
if (requests.size() == 1) {
return performSingleRequest(requests, timeout, nrDone, logTopic);
}
#endif
CoordTransactionID coordinatorTransactionID = TRI_NewTickServer();
ClusterCommTimeout startTime = TRI_microtime();
@ -1354,12 +1356,15 @@ size_t ClusterComm::performSingleRequest(
std::unordered_map<std::string, std::string> headers;
// mop: helpless attempt to fix segfaulting due to body buffer empty
if (req.result.status == CL_COMM_BACKEND_UNAVAILABLE) {
THROW_ARANGO_EXCEPTION(TRI_ERROR_CLUSTER_BACKEND_UNAVAILABLE);
nrDone = 0;
return 0;
}
if (req.result.status == CL_COMM_ERROR && req.result.result != nullptr
&& req.result.result->getHttpReturnCode() == 503) {
THROW_ARANGO_EXCEPTION(TRI_ERROR_CLUSTER_BACKEND_UNAVAILABLE);
req.result.status = CL_COMM_BACKEND_UNAVAILABLE;
nrDone = 0;
return 0;
}
// Add correct recognition of content type later.

View File

@ -341,6 +341,7 @@ function SynchronousReplicationSuite () {
tearDown : function () {
db._drop(cn);
global.ArangoAgency.set('Target/FailedServers', []);
},
////////////////////////////////////////////////////////////////////////////////