summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2017-10-10 13:52:38 +0000
committerTor Egge <Tor.Egge@oath.com>2017-10-10 13:52:38 +0000
commit101d599ab0478ba9e8d2bc6558f708909e12d4a9 (patch)
treeb0d2d90eedeb02cfec0cae9ac4c061942b4e6107 /searchcore
parent64dc18c66319310fe2ba45fe60268e0b59046bc1 (diff)
Add minimal test using multiple bucket spaces when peristence provider
claims to support it.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/apps/tests/persistenceconformance_test.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/searchcore/src/apps/tests/persistenceconformance_test.cpp b/searchcore/src/apps/tests/persistenceconformance_test.cpp
index 64786903dab..0ea3b41f232 100644
--- a/searchcore/src/apps/tests/persistenceconformance_test.cpp
+++ b/searchcore/src/apps/tests/persistenceconformance_test.cpp
@@ -40,6 +40,7 @@ using namespace vespa::config::search::summary;
using namespace vespa::config::search;
using std::shared_ptr;
+using document::BucketSpace;
using document::DocumentType;
using document::DocumentTypeRepo;
using document::DocumenttypesConfig;
@@ -160,7 +161,8 @@ private:
public:
DocumentDBFactory(const vespalib::string &baseDir, int tlsListenPort);
~DocumentDBFactory();
- DocumentDB::SP create(const DocTypeName &docType,
+ DocumentDB::SP create(BucketSpace bucketSpace,
+ const DocTypeName &docType,
const ConfigFactory &factory) {
DocumentDBConfig::SP snapshot = factory.create(docType);
vespalib::mkdir(_baseDir, false);
@@ -188,7 +190,7 @@ public:
_queryLimiter,
_clock,
docType,
- makeBucketSpace(),
+ bucketSpace,
*b->getProtonConfigSP(),
const_cast<DocumentDBFactory &>(*this),
_summaryExecutor,
@@ -227,7 +229,9 @@ public:
{
DocTypeVector types = cfgFactory.getDocTypes();
for (size_t i = 0; i < types.size(); ++i) {
- DocumentDB::SP docDb = docDbFactory.create(types[i],
+ BucketSpace bucketSpace(makeBucketSpace(types[i].getName()));
+ DocumentDB::SP docDb = docDbFactory.create(bucketSpace,
+ types[i],
cfgFactory);
docDb->start();
docDb->waitForOnlineState();
@@ -384,6 +388,7 @@ public:
virtual bool hasPersistence() const override { return true; }
virtual bool supportsActiveState() const override { return true; }
+ virtual bool supportsBucketSpaces() const override { return true; }
};
@@ -585,6 +590,11 @@ TEST_F("require thant testJoinSameSourceBucketsTargetExists() works",
f.test.testJoinSameSourceBucketsTargetExists();
}
+TEST_F("require that multiple bucket spaces works", TestFixture)
+{
+ f.test.testBucketSpaces();
+}
+
// *** Run all conformance tests, but ignore the results BEGIN ***
#define CONVERT_TEST(testFunction) \