aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-04-13 07:47:33 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-04-13 07:47:33 +0000
commit045babd97ccd8ba1bf44c14d0bce326c1f1a57be (patch)
tree625e9ed63e07c80f4895bd2608821507a4b1b121 /searchcore/src/tests
parentf9cc338cc28a79045da882db7ddcc8e02cb301df (diff)
Force having documentdb as shared_ptr.
Diffstat (limited to 'searchcore/src/tests')
-rw-r--r--searchcore/src/tests/proton/docsummary/docsummary.cpp12
-rw-r--r--searchcore/src/tests/proton/documentdb/documentdb_test.cpp2
2 files changed, 7 insertions, 7 deletions
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp
index 9529555a33c..8dae53abf50 100644
--- a/searchcore/src/tests/proton/docsummary/docsummary.cpp
+++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp
@@ -186,7 +186,7 @@ public:
const std::shared_ptr<const DocumentTypeRepo> _repo;
TuneFileDocumentDB::SP _tuneFileDocumentDB;
HwInfo _hwInfo;
- std::unique_ptr<DocumentDB> _ddb;
+ std::shared_ptr<DocumentDB> _ddb;
AttributeWriter::UP _aw;
ISummaryAdapter::SP _sa;
@@ -221,11 +221,11 @@ public:
if (! FastOS_File::MakeDirectory((std::string("tmpdb/") + docTypeName).c_str())) {
LOG_ABORT("should not be reached");
}
- _ddb = std::make_unique<DocumentDB>("tmpdb", _configMgr.getConfig(), "tcp/localhost:9013", _queryLimiter, _clock,
- DocTypeName(docTypeName), makeBucketSpace(), *b->getProtonConfigSP(), *this,
- _summaryExecutor, _summaryExecutor, _bucketExecutor, _tls, _dummy, _fileHeaderContext,
- std::make_unique<MemoryConfigStore>(),
- std::make_shared<vespalib::ThreadStackExecutor>(16, 128_Ki), _hwInfo),
+ _ddb = DocumentDB::create("tmpdb", _configMgr.getConfig(), "tcp/localhost:9013", _queryLimiter, _clock,
+ DocTypeName(docTypeName), makeBucketSpace(), *b->getProtonConfigSP(), *this,
+ _summaryExecutor, _summaryExecutor, _bucketExecutor, _tls, _dummy, _fileHeaderContext,
+ std::make_unique<MemoryConfigStore>(),
+ std::make_shared<vespalib::ThreadStackExecutor>(16, 128_Ki), _hwInfo),
_ddb->start();
_ddb->waitForOnlineState();
_aw = std::make_unique<AttributeWriter>(_ddb->getReadySubDB()->getAttributeManager());
diff --git a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
index 3c65326b11a..463a7b164e1 100644
--- a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
@@ -108,7 +108,7 @@ Fixture::Fixture()
tuneFileDocumentDB, HwInfo());
mgr.forwardConfig(b);
mgr.nextGeneration(0ms);
- _db = std::make_shared<DocumentDB>(".", mgr.getConfig(), "tcp/localhost:9014", _queryLimiter, _clock, DocTypeName("typea"),
+ _db = DocumentDB::create(".", mgr.getConfig(), "tcp/localhost:9014", _queryLimiter, _clock, DocTypeName("typea"),
makeBucketSpace(),
*b->getProtonConfigSP(), _myDBOwner, _summaryExecutor, _summaryExecutor, _bucketExecutor, _tls, _dummy,
_fileHeaderContext, std::make_unique<MemoryConfigStore>(),