mirror of https://gitee.com/bigwinds/arangodb
Fix GeneralRequestMock constructor sequence (#6102)
This commit is contained in:
parent
66efaa6022
commit
e374f906aa
|
@ -26,6 +26,7 @@
|
|||
#include "VocBase/vocbase.h"
|
||||
|
||||
GeneralRequestMock::GeneralRequestMock(TRI_vocbase_t& vocbase) {
|
||||
_authenticated = false; // must be set before VocbaseContext::create(...)
|
||||
_isRequestContextOwner = false; // must be set before VocbaseContext::create(...)
|
||||
_context.reset(arangodb::VocbaseContext::create(*this, vocbase));
|
||||
_context->vocbase().forceUse(); // must be called or ~VocbaseContext() will fail at '_vocbase.release()'
|
||||
|
@ -124,4 +125,4 @@ arangodb::Endpoint::TransportType GeneralResponseMock::transportType() {
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue