diff options
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp')
-rw-r--r-- | searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp | 90 |
1 files changed, 42 insertions, 48 deletions
diff --git a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp index 93a1b6de3ad..841e7632730 100644 --- a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp +++ b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp @@ -139,34 +139,26 @@ struct MyStoreOnlyContext StoreOnlyContext _ctx; MyStoreOnlyContext(IThreadingService &writeService, ThreadStackExecutorBase &summaryExecutor, - std::shared_ptr<BucketDBOwner> bucketDB, - IBucketDBHandlerInitializer & - bucketDBHandlerInitializer) - : _owner(), - _syncProxy(), - _getSerialNum(), - _fileHeader(), - _metrics(DOCTYPE_NAME, 1), - _configMutex(), - _hwInfo(), - _ctx(_owner, - _syncProxy, - _getSerialNum, - _fileHeader, - writeService, - summaryExecutor, - bucketDB, - bucketDBHandlerInitializer, - _metrics, - _configMutex, - _hwInfo) - { - } + std::shared_ptr<BucketDBOwner> bucketDB, + IBucketDBHandlerInitializer & + bucketDBHandlerInitializer); + ~MyStoreOnlyContext(); const MySubDBOwner &getOwner() const { return _owner; } }; +MyStoreOnlyContext::MyStoreOnlyContext(IThreadingService &writeService, ThreadStackExecutorBase &summaryExecutor, + std::shared_ptr<BucketDBOwner> bucketDB, + IBucketDBHandlerInitializer &bucketDBHandlerInitializer) + : _owner(), _syncProxy(), _getSerialNum(), _fileHeader(), + _metrics(DOCTYPE_NAME, 1), _configMutex(), _hwInfo(), + _ctx(_owner, _syncProxy, _getSerialNum, _fileHeader, writeService, summaryExecutor, bucketDB, + bucketDBHandlerInitializer, _metrics, _configMutex, _hwInfo) +{ +} +MyStoreOnlyContext::~MyStoreOnlyContext() {} + template <bool FastAccessAttributesOnly> struct MyFastAccessConfig { @@ -187,18 +179,9 @@ struct MyFastAccessContext FastAccessContext _ctx; MyFastAccessContext(IThreadingService &writeService, ThreadStackExecutorBase &summaryExecutor, - std::shared_ptr<BucketDBOwner> bucketDB, - IBucketDBHandlerInitializer & - bucketDBHandlerInitializer) - : _storeOnlyCtx(writeService, summaryExecutor, bucketDB, - bucketDBHandlerInitializer), - _attributeMetrics(NULL), - _legacyAttributeMetrics(NULL), - _attributeMetricsCollection(_attributeMetrics, _legacyAttributeMetrics), - _wireService(), - _ctx(_storeOnlyCtx._ctx, _attributeMetricsCollection, NULL, _wireService) - { - } + std::shared_ptr<BucketDBOwner> bucketDB, + IBucketDBHandlerInitializer & bucketDBHandlerInitializer); + ~MyFastAccessContext(); const MyMetricsWireService &getWireService() const { return _wireService; } @@ -207,6 +190,17 @@ struct MyFastAccessContext } }; +MyFastAccessContext::MyFastAccessContext(IThreadingService &writeService, ThreadStackExecutorBase &summaryExecutor, + std::shared_ptr<BucketDBOwner> bucketDB, + IBucketDBHandlerInitializer & bucketDBHandlerInitializer) + : _storeOnlyCtx(writeService, summaryExecutor, bucketDB, bucketDBHandlerInitializer), + _attributeMetrics(NULL), _legacyAttributeMetrics(NULL), + _attributeMetricsCollection(_attributeMetrics, _legacyAttributeMetrics), + _wireService(), + _ctx(_storeOnlyCtx._ctx, _attributeMetricsCollection, NULL, _wireService) +{} +MyFastAccessContext::~MyFastAccessContext() {} + struct MySearchableConfig { SearchableConfig _cfg; @@ -224,19 +218,9 @@ struct MySearchableContext SearchableContext _ctx; MySearchableContext(IThreadingService &writeService, ThreadStackExecutorBase &executor, - std::shared_ptr<BucketDBOwner> bucketDB, - IBucketDBHandlerInitializer & - bucketDBHandlerInitializer) - : _fastUpdCtx(writeService, executor, bucketDB, - bucketDBHandlerInitializer), - _queryLimiter(), - _clock(), - _ctx(_fastUpdCtx._ctx, - _queryLimiter, - _clock, - executor) - { - } + std::shared_ptr<BucketDBOwner> bucketDB, + IBucketDBHandlerInitializer & bucketDBHandlerInitializer); + ~MySearchableContext(); const MyMetricsWireService &getWireService() const { return _fastUpdCtx.getWireService(); } @@ -245,6 +229,16 @@ struct MySearchableContext } }; + +MySearchableContext::MySearchableContext(IThreadingService &writeService, ThreadStackExecutorBase &executor, + std::shared_ptr<BucketDBOwner> bucketDB, + IBucketDBHandlerInitializer & bucketDBHandlerInitializer) + : _fastUpdCtx(writeService, executor, bucketDB, bucketDBHandlerInitializer), + _queryLimiter(), _clock(), + _ctx(_fastUpdCtx._ctx, _queryLimiter, _clock, executor) +{} +MySearchableContext::~MySearchableContext() {} + struct OneAttrSchema : public Schema { OneAttrSchema() { |