diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-12-08 17:40:48 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-12-08 17:40:48 +0000 |
commit | 8e910e3977c4522f3c99764f79fa8f374271c224 (patch) | |
tree | ab5497dc3038345fcaaa262a6f3e4213f7e123df /searchcore/src/tests/proton/documentdb/documentdb_test.cpp | |
parent | 11d358a64324317b3f63dae3be4cbe37f735473d (diff) |
Add SessionManager in IDocumentDBOwner, but only use in mocks in tests for now.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/documentdb_test.cpp')
-rw-r--r-- | searchcore/src/tests/proton/documentdb/documentdb_test.cpp | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp index 916f3106923..7aa18513f73 100644 --- a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp +++ b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp @@ -1,13 +1,6 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <tests/proton/common/dummydbowner.h> -#include <vespa/config-bucketspaces.h> -#include <vespa/config/subscription/sourcespec.h> -#include <vespa/document/config/documenttypes_config_fwd.h> -#include <vespa/document/datatype/documenttype.h> -#include <vespa/document/repo/documenttyperepo.h> -#include <vespa/document/test/make_bucket_space.h> -#include <vespa/fnet/transport.h> +#include <vespa/searchcore/proton/test/dummydbowner.h> #include <vespa/searchcore/proton/attribute/flushableattribute.h> #include <vespa/searchcore/proton/common/statusreport.h> #include <vespa/searchcore/proton/docsummary/summaryflushtarget.h> @@ -18,6 +11,7 @@ #include <vespa/searchcore/proton/metrics/job_tracked_flush_target.h> #include <vespa/searchcore/proton/metrics/metricswireservice.h> #include <vespa/searchcore/proton/reference/i_document_db_reference.h> +#include <vespa/searchcore/proton/reference/i_document_db_reference_registry.h> #include <vespa/searchcore/proton/server/bootstrapconfig.h> #include <vespa/searchcore/proton/server/document_db_explorer.h> #include <vespa/searchcore/proton/server/documentdb.h> @@ -27,6 +21,13 @@ #include <vespa/searchcore/proton/server/memoryconfigstore.h> #include <vespa/searchcore/proton/test/mock_shared_threading_service.h> #include <vespa/searchcorespi/index/indexflushtarget.h> +#include <vespa/config-bucketspaces.h> +#include <vespa/config/subscription/sourcespec.h> +#include <vespa/document/config/documenttypes_config_fwd.h> +#include <vespa/document/datatype/documenttype.h> +#include <vespa/document/repo/documenttyperepo.h> +#include <vespa/document/test/make_bucket_space.h> +#include <vespa/fnet/transport.h> #include <vespa/searchlib/attribute/attribute_read_guard.h> #include <vespa/searchlib/attribute/interlock.h> #include <vespa/searchlib/index/dummyfileheadercontext.h> @@ -78,22 +79,6 @@ config_subdir(SerialNum serialNum) return os.str(); } -struct MyDBOwner : public DummyDBOwner -{ - std::shared_ptr<DocumentDBReferenceRegistry> _registry; - MyDBOwner(); - ~MyDBOwner() override; - std::shared_ptr<IDocumentDBReferenceRegistry> getDocumentDBReferenceRegistry() const override { - return _registry; - } -}; - -MyDBOwner::MyDBOwner() - : DummyDBOwner(), - _registry(std::make_shared<DocumentDBReferenceRegistry>()) -{} -MyDBOwner::~MyDBOwner() = default; - struct FixtureBase { bool _cleanup; bool _file_config; @@ -119,7 +104,7 @@ FixtureBase::~FixtureBase() struct Fixture : public FixtureBase { DummyWireService _dummy; - MyDBOwner _myDBOwner; + DummyDBOwner _myDBOwner; vespalib::ThreadStackExecutor _summaryExecutor; MockSharedThreadingService _shared_service; HwInfo _hwInfo; |