mirror of https://gitee.com/bigwinds/arangodb
Bug fix/fix test muell (#8703)
This commit is contained in:
parent
ed1e0336cb
commit
6b9b9b0946
|
@ -34,6 +34,7 @@
|
|||
#include "Rest/HttpRequest.h"
|
||||
#include "Rest/Version.h"
|
||||
#include "StorageEngine/EngineSelectorFeature.h"
|
||||
#include "Transaction/StandaloneContext.h"
|
||||
|
||||
using namespace arangodb;
|
||||
|
||||
|
@ -47,7 +48,7 @@ using namespace arangodb::consensus;
|
|||
|
||||
RestAgencyHandler::RestAgencyHandler(GeneralRequest* request,
|
||||
GeneralResponse* response, Agent* agent)
|
||||
: RestBaseHandler(request, response), _agent(agent) {}
|
||||
: RestVocbaseBaseHandler(request, response), _agent(agent) {}
|
||||
|
||||
inline RestStatus RestAgencyHandler::reportErrorEmptyRequest() {
|
||||
LOG_TOPIC("46536", WARN, Logger::AGENCY)
|
||||
|
@ -566,7 +567,8 @@ RestStatus RestAgencyHandler::handleState() {
|
|||
VPackObjectBuilder o(&body);
|
||||
_agent->readDB(body);
|
||||
}
|
||||
generateResult(rest::ResponseCode::OK, body.slice());
|
||||
auto ctx = std::make_shared<transaction::StandaloneContext>(_vocbase);
|
||||
generateResult(rest::ResponseCode::OK, body.slice(), ctx->getVPackOptionsForDump());
|
||||
return RestStatus::DONE;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#define ARANGOD_REST_HANDLER_REST_AGENCY_HANDLER_H 1
|
||||
|
||||
#include "Agency/Agent.h"
|
||||
#include "RestHandler/RestBaseHandler.h"
|
||||
#include "RestHandler/RestVocbaseBaseHandler.h"
|
||||
|
||||
namespace arangodb {
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace arangodb {
|
|||
/// @brief REST handler for outside calls to agency (write & read)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class RestAgencyHandler : public RestBaseHandler {
|
||||
class RestAgencyHandler : public RestVocbaseBaseHandler {
|
||||
public:
|
||||
RestAgencyHandler(GeneralRequest*, GeneralResponse*, consensus::Agent*);
|
||||
|
||||
|
|
|
@ -839,17 +839,16 @@ function dumpAgency(instanceInfo, options) {
|
|||
if (agencyReply.code === 200) {
|
||||
let agencyValue = JSON.parse(agencyReply.body);
|
||||
fs.write(fs.join(options.testOutputDirectory, fn + '_' + arangod.pid + ".json"), JSON.stringify(agencyValue, null, 2));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
print(agencyReply);
|
||||
}
|
||||
}
|
||||
instanceInfo.arangods.forEach((arangod) => {
|
||||
if (arangod.role === "agent") {
|
||||
if (arangod.hasOwnProperty('exitStatus')) {
|
||||
print(Date() + " this agent is already dead: " + arangod);
|
||||
print(Date() + " this agent is already dead: " + JSON.stringify(arangod));
|
||||
} else {
|
||||
print(Date() + " Attempting to dump Agent: " + arangod);
|
||||
print(Date() + " Attempting to dump Agent: " + JSON.stringify(arangod));
|
||||
dumpAgent(arangod, '/_api/agency/config', 'GET', 'agencyConfig');
|
||||
|
||||
dumpAgent(arangod, '/_api/agency/state', 'GET', 'agencyState');
|
||||
|
|
|
@ -138,7 +138,7 @@ const optionsDefaults = {
|
|||
'extraArgs': {},
|
||||
'extremeVerbosity': false,
|
||||
'force': true,
|
||||
'getSockStat': true,
|
||||
'getSockStat': false,
|
||||
'arangosearch':true,
|
||||
'jsonReply': false,
|
||||
'loopEternal': false,
|
||||
|
|
Loading…
Reference in New Issue