aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-01-30 17:59:58 +0100
committerHenning Baldersheim <balder@oath.com>2018-01-30 17:59:58 +0100
commit0ac738014ccc2eea8bbddf67eee697b6503386c1 (patch)
tree820a94183eb261971e16b41bb4a055260350e341 /searchcore/src/tests/proton
parent91b5ea5eb3290a305978338f1fe11fa8b738d906 (diff)
Add the HwInfo to the BootstrapConfig.
Diffstat (limited to 'searchcore/src/tests/proton')
-rw-r--r--searchcore/src/tests/proton/docsummary/docsummary.cpp2
-rw-r--r--searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp2
-rw-r--r--searchcore/src/tests/proton/documentdb/documentdb_test.cpp2
-rw-r--r--searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp5
-rw-r--r--searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp22
-rw-r--r--searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp2
6 files changed, 17 insertions, 18 deletions
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp
index dae50fcc860..ff393682f9b 100644
--- a/searchcore/src/tests/proton/docsummary/docsummary.cpp
+++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp
@@ -208,7 +208,7 @@ public:
std::make_shared<ProtonConfig>(),
std::make_shared<FiledistributorrpcConfig>(),
std::make_shared<BucketspacesConfig>(),
- _tuneFileDocumentDB);
+ _tuneFileDocumentDB, _hwInfo);
_configMgr.forwardConfig(b);
_configMgr.nextGeneration(0);
if (! FastOS_File::MakeDirectory((std::string("tmpdb/") + docTypeName).c_str())) { abort(); }
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 e655ae0d739..e39fd1fe28a 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
@@ -284,7 +284,7 @@ struct MyConfigSnapshot
std::make_shared<ProtonConfig>(),
std::make_shared<FiledistributorrpcConfig>(),
std::make_shared<BucketspacesConfig>(),
- tuneFileDocumentDB);
+ tuneFileDocumentDB, HwInfo());
config::DirSpec spec(cfgDir);
DocumentDBConfigHelper mgr(spec, "searchdocument");
mgr.forwardConfig(_bootstrap);
diff --git a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
index f93930d189b..9f6eb0ea4e1 100644
--- a/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentdb_test.cpp
@@ -99,7 +99,7 @@ Fixture::Fixture()
std::make_shared<ProtonConfig>(),
std::make_shared<FiledistributorrpcConfig>(),
std::make_shared<BucketspacesConfig>(),
- tuneFileDocumentDB));
+ tuneFileDocumentDB, HwInfo()));
mgr.forwardConfig(b);
mgr.nextGeneration(0);
_db.reset(new DocumentDB(".", mgr.getConfig(), "tcp/localhost:9014", _queryLimiter, _clock, DocTypeName("typea"),
diff --git a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp
index 6b1031fe558..dd35d823b99 100644
--- a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp
@@ -40,13 +40,12 @@ makeBaseConfigSnapshot()
DBCM dbcm(spec, "test");
DocumenttypesConfigSP dtcfg(config::ConfigGetter<DocumenttypesConfig>::getConfig("", spec).release());
- BootstrapConfig::SP b(new BootstrapConfig(1,
- dtcfg,
+ BootstrapConfig::SP b(new BootstrapConfig(1, dtcfg,
DocumentTypeRepo::SP(new DocumentTypeRepo(*dtcfg)),
std::make_shared<ProtonConfig>(),
std::make_shared<FiledistributorrpcConfig>(),
std::make_shared<BucketspacesConfig>(),
- std::make_shared<TuneFileDocumentDB>()));
+ std::make_shared<TuneFileDocumentDB>(), HwInfo()));
dbcm.forwardConfig(b);
dbcm.nextGeneration(0);
DocumentDBConfig::SP snap = dbcm.getConfig();
diff --git a/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp b/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp
index 994cbd86aa7..7db1fd001d4 100644
--- a/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp
+++ b/searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp
@@ -60,7 +60,6 @@ struct ConfigTestFixture {
ConfigSet set;
IConfigContext::SP context;
int idcounter;
- HwInfo hwInfo;
ConfigTestFixture(const std::string & id)
: configId(id),
@@ -147,14 +146,15 @@ struct ConfigTestFixture {
documenttypesBuilder == bootstrapConfig->getDocumenttypesConfig());
}
- BootstrapConfig::SP getBootstrapConfig(int64_t generation) const {
+ BootstrapConfig::SP getBootstrapConfig(int64_t generation, const HwInfo & hwInfo) const {
return BootstrapConfig::SP(new BootstrapConfig(generation,
- BootstrapConfig::DocumenttypesConfigSP(new DocumenttypesConfig(documenttypesBuilder)),
- DocumentTypeRepo::SP(new DocumentTypeRepo(documenttypesBuilder)),
- BootstrapConfig::ProtonConfigSP(new ProtonConfig(protonBuilder)),
+ std::make_shared<DocumenttypesConfig>(documenttypesBuilder),
+ std::make_shared<DocumentTypeRepo>(documenttypesBuilder),
+ std::make_shared<ProtonConfig>(protonBuilder),
std::make_shared<FiledistributorrpcConfig>(),
std::make_shared<BucketspacesConfig>(bucketspacesBuilder),
- std::make_shared<TuneFileDocumentDB>()));
+ std::make_shared<TuneFileDocumentDB>(),
+ hwInfo));
}
void reload() { context->reload(); }
@@ -236,8 +236,8 @@ DocumentDBConfig::SP
getDocumentDBConfig(ConfigTestFixture &f, DocumentDBConfigManager &mgr, const HwInfo & hwInfo)
{
ConfigRetriever retriever(mgr.createConfigKeySet(), f.context);
- mgr.forwardConfig(f.getBootstrapConfig(1));
- mgr.update(retriever.getBootstrapConfigs(), hwInfo); // Cheating, but we only need the configs
+ mgr.forwardConfig(f.getBootstrapConfig(1, hwInfo));
+ mgr.update(retriever.getBootstrapConfigs()); // Cheating, but we only need the configs
return mgr.getConfig();
}
@@ -281,7 +281,7 @@ TEST_FF("require that documentdb config manager builds schema with imported attr
TEST_FFF("require that proton config fetcher follows changes to bootstrap",
ConfigTestFixture("search"),
ProtonConfigOwner(),
- ProtonConfigFetcher(ConfigUri(f1.configId, f1.context), f1.hwInfo, f2, 60000)) {
+ ProtonConfigFetcher(ConfigUri(f1.configId, f1.context), f2, 60000)) {
f3.start();
ASSERT_TRUE(f2._configured);
ASSERT_TRUE(f1.configEqual(f2.getBootstrapConfig()));
@@ -296,7 +296,7 @@ TEST_FFF("require that proton config fetcher follows changes to bootstrap",
TEST_FFF("require that proton config fetcher follows changes to doctypes",
ConfigTestFixture("search"),
ProtonConfigOwner(),
- ProtonConfigFetcher(ConfigUri(f1.configId, f1.context), f1.hwInfo, f2, 60000)) {
+ ProtonConfigFetcher(ConfigUri(f1.configId, f1.context), f2, 60000)) {
f3.start();
f2._configured = false;
@@ -316,7 +316,7 @@ TEST_FFF("require that proton config fetcher follows changes to doctypes",
TEST_FFF("require that proton config fetcher reconfigures dbowners",
ConfigTestFixture("search"),
ProtonConfigOwner(),
- ProtonConfigFetcher(ConfigUri(f1.configId, f1.context), f1.hwInfo, f2, 60000)) {
+ ProtonConfigFetcher(ConfigUri(f1.configId, f1.context), f2, 60000)) {
f3.start();
ASSERT_FALSE(f2.getDocumentDBConfig("typea"));
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 a8336e29f9f..d59a67d73bb 100644
--- a/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp
+++ b/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp
@@ -171,7 +171,7 @@ struct ConfigFixture {
BootstrapConfig::ProtonConfigSP(new ProtonConfig(_protonBuilder)),
std::make_shared<FiledistributorrpcConfig>(),
std::make_shared<BucketspacesConfig>(_bucketspacesBuilder),
- std::make_shared<TuneFileDocumentDB>()));
+ std::make_shared<TuneFileDocumentDB>(), HwInfo()));
}
std::shared_ptr<ProtonConfigSnapshot> getConfigSnapshot()