aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-12-08 23:55:21 +0100
committerGitHub <noreply@github.com>2022-12-08 23:55:21 +0100
commit0f15b405cad738460a8126bf9ef689ec3edfd094 (patch)
treeca54173403ceb088b109649ee899f919411b48cf /searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp
parentc08e5c59f4162ee7ec1c8038e0e884486b8e8a62 (diff)
parente4c5580f64be5934d6b7690efc719d542c5be526 (diff)
Merge pull request #25178 from vespa-engine/balder/provide-sessionmanager-via-idocumentsubdbownerv8.97.26
Wire SessionManager via IDocumentSubDBOwner
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.cpp10
1 files changed, 8 insertions, 2 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 43717fc724f..dd402a6e637 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
@@ -93,11 +93,18 @@ struct ConfigDir4 { static vespalib::string dir() { return TEST_PATH("cfg4"); }
struct MySubDBOwner : public IDocumentSubDBOwner
{
+ SessionManager _sessionMgr;
+ MySubDBOwner();
+ ~MySubDBOwner() override;
document::BucketSpace getBucketSpace() const override { return makeBucketSpace(); }
vespalib::string getName() const override { return "owner"; }
uint32_t getDistributionKey() const override { return -1; }
+ SessionManager & session_manager() override { return _sessionMgr; }
};
+MySubDBOwner::MySubDBOwner() : _sessionMgr(1) {}
+MySubDBOwner::~MySubDBOwner() = default;
+
struct MySyncProxy : public SyncProxy
{
void sync(SerialNum) override {}
@@ -354,8 +361,7 @@ struct FixtureBase
vespalib::ThreadStackExecutor executor(1, 1_Mi);
initializer::TaskRunner taskRunner(executor);
taskRunner.runTask(task);
- auto sessionMgr = std::make_shared<SessionManager>(1);
- runInMasterAndSync([&]() { _subDb.initViews(*_snapshot->_cfg, sessionMgr); });
+ runInMasterAndSync([&]() { _subDb.initViews(*_snapshot->_cfg); });
}
void basicReconfig(SerialNum serialNum) {
runInMasterAndSync([&]() { performReconfig(serialNum, make_all_attr_schema(two_attr_schema), ConfigDir2::dir()); });