summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorGeir Storli <geirstorli@yahoo.no>2017-10-11 09:43:07 +0200
committerGitHub <noreply@github.com>2017-10-11 09:43:07 +0200
commit511fac30e290be701622de1168dc87abf68e5ba6 (patch)
treee2562e44ac040fca4ef5bf2237f09e6b8d6ab699 /searchcore
parentd79985b3b035009e7ae58bfe8769ae4b23ed593d (diff)
parent101d599ab0478ba9e8d2bc6558f708909e12d4a9 (diff)
Merge pull request #3701 from vespa-engine/toregge/check-multiple-bucket-spaces-in-persistence-conformance-test
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) \