diff options
Diffstat (limited to 'searchcore/src/tests/proton')
-rw-r--r-- | searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp | 36 | ||||
-rw-r--r-- | searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp | 12 |
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(); } |