aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/proton_configurer
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2018-07-24 16:24:49 +0200
committerTor Egge <Tor.Egge@oath.com>2018-07-25 13:00:30 +0000
commit31d2e654e5d08024712e64ca817ec68d3d31121a (patch)
tree85450d31a50fb91b41f360c4a31d1ce0435b996a /searchcore/src/tests/proton/proton_configurer
parente3af3d215feb1e416b27b92bbf421dde281f3a09 (diff)
Track document db destruction.
Wait until document db has been destroyed when pruning old document dbs.
Diffstat (limited to 'searchcore/src/tests/proton/proton_configurer')
-rw-r--r--searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp b/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp
index 045c8de9384..a89f2e3f0ff 100644
--- a/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp
+++ b/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp
@@ -12,7 +12,7 @@
#include <vespa/searchcore/proton/server/bootstrapconfig.h>
#include <vespa/searchcore/proton/server/bootstrapconfigmanager.h>
#include <vespa/searchcore/proton/server/documentdbconfigmanager.h>
-#include <vespa/searchcore/proton/server/i_document_db_config_owner.h>
+#include <vespa/searchcore/proton/server/document_db_config_owner.h>
#include <vespa/searchcore/proton/server/proton_config_snapshot.h>
#include <vespa/searchcore/proton/server/proton_configurer.h>
#include <vespa/searchcore/proton/server/i_proton_configurer_owner.h>
@@ -208,13 +208,13 @@ struct ConfigFixture {
struct MyProtonConfigurerOwner;
-struct MyDocumentDBConfigOwner : public IDocumentDBConfigOwner
+struct MyDocumentDBConfigOwner : public DocumentDBConfigOwner
{
vespalib::string _name;
MyProtonConfigurerOwner &_owner;
MyDocumentDBConfigOwner(const vespalib::string &name,
MyProtonConfigurerOwner &owner)
- : IDocumentDBConfigOwner(),
+ : DocumentDBConfigOwner(),
_name(name),
_owner(owner)
{
@@ -240,12 +240,12 @@ struct MyProtonConfigurerOwner : public IProtonConfigurerOwner
}
virtual ~MyProtonConfigurerOwner() { }
- virtual IDocumentDBConfigOwner *addDocumentDB(const DocTypeName &docTypeName,
- document::BucketSpace bucketSpace,
- const vespalib::string &configId,
- const std::shared_ptr<BootstrapConfig> &bootstrapConfig,
- const std::shared_ptr<DocumentDBConfig> &documentDBConfig,
- InitializeThreads initializeThreads) override
+ virtual std::shared_ptr<DocumentDBConfigOwner> addDocumentDB(const DocTypeName &docTypeName,
+ document::BucketSpace bucketSpace,
+ const vespalib::string &configId,
+ const std::shared_ptr<BootstrapConfig> &bootstrapConfig,
+ const std::shared_ptr<DocumentDBConfig> &documentDBConfig,
+ InitializeThreads initializeThreads) override
{
(void) bucketSpace;
(void) configId;
@@ -257,7 +257,7 @@ struct MyProtonConfigurerOwner : public IProtonConfigurerOwner
std::ostringstream os;
os << "add db " << docTypeName.getName() << " " << documentDBConfig->getGeneration();
_log.push_back(os.str());
- return db.get();
+ return db;
}
virtual void removeDocumentDB(const DocTypeName &docTypeName) override {
ASSERT_FALSE(_dbs.find(docTypeName) == _dbs.end());