summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-12-07 11:50:24 +0100
committerGitHub <noreply@github.com>2017-12-07 11:50:24 +0100
commitd47b69f22029077852de7663d51a24ca46a42108 (patch)
tree32f6ee378b247825ffc67dc1220e79be237dcace /searchcore/src/tests
parentff0e8671bb8e4d58ae424cdce791bbe61eb3eb8b (diff)
parent8535cbb1cfde7c23d4947a9b1a1e062b0469c722 (diff)
Merge pull request #4377 from vespa-engine/toregge/use-alternate-maxflushed-parameter-when-node-is-retired
Use alternate maxflushed parameter when node is retired.
Diffstat (limited to 'searchcore/src/tests')
-rw-r--r--searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp36
-rw-r--r--searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp12
2 files changed, 44 insertions, 4 deletions
diff --git a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
index 87efd74659d..d3567da3527 100644
--- a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
@@ -666,6 +666,42 @@ TEST("require that maintenance controller should change if some config has chang
TEST_DO(assertMaintenanceControllerShouldChange(CCR().setMaintenanceChanged(true)));
}
+void
+assertSubDbsShouldNotChange(DocumentDBConfig::ComparisonResult result)
+{
+ ReconfigParams params(result);
+ EXPECT_FALSE(params.configHasChanged());
+ EXPECT_FALSE(params.shouldSubDbsChange());
+}
+
+void
+assertSubDbsShouldChange(DocumentDBConfig::ComparisonResult result)
+{
+ ReconfigParams params(result);
+ EXPECT_TRUE(params.configHasChanged());
+ EXPECT_TRUE(params.shouldSubDbsChange());
+}
+
+
+TEST("require that subdbs should change if relevant config changed")
+{
+ TEST_DO(assertSubDbsShouldNotChange(CCR()));
+ EXPECT_FALSE(ReconfigParams(CCR().setMaintenanceChanged(true)).shouldSubDbsChange());
+ TEST_DO(assertSubDbsShouldChange(CCR().setFlushChanged(true)));
+ TEST_DO(assertSubDbsShouldChange(CCR().setStoreChanged(true)));
+ TEST_DO(assertSubDbsShouldChange(CCR().setDocumenttypesChanged(true)));
+ TEST_DO(assertSubDbsShouldChange(CCR().setDocumentTypeRepoChanged(true)));
+ TEST_DO(assertSubDbsShouldChange(CCR().setSummaryChanged(true)));
+ TEST_DO(assertSubDbsShouldChange(CCR().setSummarymapChanged(true)));
+ TEST_DO(assertSubDbsShouldChange(CCR().setJuniperrcChanged(true)));
+ TEST_DO(assertSubDbsShouldChange(CCR().setAttributesChanged(true)));
+ TEST_DO(assertSubDbsShouldChange(CCR().setImportedFieldsChanged(true)));
+ TEST_DO(assertSubDbsShouldChange(CCR().setVisibilityDelayChanged(true)));
+ TEST_DO(assertSubDbsShouldChange(CCR().setRankProfilesChanged(true)));
+ TEST_DO(assertSubDbsShouldChange(CCR().setRankingConstantsChanged(true)));
+ TEST_DO(assertSubDbsShouldChange(CCR().setSchemaChanged(true)));
+}
+
TEST_MAIN()
{
TEST_RUN_ALL();
diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
index b84aa1c1c6c..0f69684373c 100644
--- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
@@ -497,7 +497,8 @@ public:
_mcCfg->getLidSpaceCompactionConfig(),
_mcCfg->getAttributeUsageFilterConfig(),
_mcCfg->getAttributeUsageSampleInterval(),
- _mcCfg->getBlockableJobConfig()));
+ _mcCfg->getBlockableJobConfig(),
+ _mcCfg->getFlushConfig()));
_mcCfg = newCfg;
forwardMaintenanceConfig();
}
@@ -514,7 +515,8 @@ public:
_mcCfg->getLidSpaceCompactionConfig(),
_mcCfg->getAttributeUsageFilterConfig(),
_mcCfg->getAttributeUsageSampleInterval(),
- _mcCfg->getBlockableJobConfig()));
+ _mcCfg->getBlockableJobConfig(),
+ _mcCfg->getFlushConfig()));
_mcCfg = newCfg;
forwardMaintenanceConfig();
}
@@ -531,7 +533,8 @@ public:
_mcCfg->getLidSpaceCompactionConfig(),
_mcCfg->getAttributeUsageFilterConfig(),
_mcCfg->getAttributeUsageSampleInterval(),
- _mcCfg->getBlockableJobConfig()));
+ _mcCfg->getBlockableJobConfig(),
+ _mcCfg->getFlushConfig()));
_mcCfg = newCfg;
forwardMaintenanceConfig();
}
@@ -546,7 +549,8 @@ public:
cfg,
_mcCfg->getAttributeUsageFilterConfig(),
_mcCfg->getAttributeUsageSampleInterval(),
- _mcCfg->getBlockableJobConfig()));
+ _mcCfg->getBlockableJobConfig(),
+ _mcCfg->getFlushConfig()));
_mcCfg = newCfg;
forwardMaintenanceConfig();
}