diff options
Diffstat (limited to 'searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp')
-rw-r--r-- | searchcore/src/tests/proton/proton_config_fetcher/proton_config_fetcher_test.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
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 b4193b0e0b2..3c9e9fc3a64 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 @@ -9,7 +9,6 @@ #include <vespa/searchcore/proton/common/alloc_config.h> #include <vespa/searchcore/proton/common/hw_info.h> #include <vespa/searchcore/proton/common/subdbtype.h> -#include <vespa/searchcore/proton/test/transport_helper.h> #include <vespa/searchcore/config/config-ranking-constants.h> #include <vespa/searchcore/config/config-ranking-expressions.h> #include <vespa/searchcore/config/config-onnx-models.h> @@ -18,7 +17,6 @@ #include <vespa/document/repo/documenttyperepo.h> #include <vespa/fileacquirer/config-filedistributorrpc.h> #include <vespa/vespalib/util/varholder.h> -#include <vespa/vespalib/util/size_literals.h> #include <vespa/vespalib/testkit/testapp.h> #include <vespa/config/common/configcontext.h> #include <vespa/config-bucketspaces.h> @@ -65,7 +63,6 @@ struct DoctypeFixture { struct ConfigTestFixture { const std::string configId; - TransportMgr transport; ProtonConfigBuilder protonBuilder; DocumenttypesConfigBuilder documenttypesBuilder; FiledistributorrpcConfigBuilder filedistBuilder; @@ -93,8 +90,6 @@ struct ConfigTestFixture { addDocType("_alwaysthere_"); } - ~ConfigTestFixture() = default; - DoctypeFixture *addDocType(const std::string &name, bool isGlobal = false) { DocumenttypesConfigBuilder::Documenttype dt; dt.bodystruct = -1270491200; @@ -254,7 +249,7 @@ getDocumentDBConfig(ConfigTestFixture &f, DocumentDBConfigManager &mgr, const Hw { ConfigRetriever retriever(mgr.createConfigKeySet(), f.context); mgr.forwardConfig(f.getBootstrapConfig(1, hwInfo)); - mgr.update(f.transport.transport(), retriever.getBootstrapConfigs()); // Cheating, but we only need the configs + mgr.update(retriever.getBootstrapConfigs()); // Cheating, but we only need the configs return mgr.getConfig(); } @@ -305,8 +300,8 @@ 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(f1.transport.transport(), ConfigUri(f1.configId, f1.context), f2, 60s)) { - f3.start(f1.transport.threadPool()); + ProtonConfigFetcher(ConfigUri(f1.configId, f1.context), f2, 60s)) { + f3.start(); ASSERT_TRUE(f2._configured); ASSERT_TRUE(f1.configEqual(f2.getBootstrapConfig())); f2._configured = false; @@ -320,8 +315,8 @@ 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(f1.transport.transport(), ConfigUri(f1.configId, f1.context), f2, 60s)) { - f3.start(f1.transport.threadPool()); + ProtonConfigFetcher(ConfigUri(f1.configId, f1.context), f2, 60s)) { + f3.start(); f2._configured = false; f1.addDocType("typea"); @@ -340,8 +335,8 @@ TEST_FFF("require that proton config fetcher follows changes to doctypes", TEST_FFF("require that proton config fetcher reconfigures dbowners", ConfigTestFixture("search"), ProtonConfigOwner(), - ProtonConfigFetcher(f1.transport.transport(), ConfigUri(f1.configId, f1.context), f2, 60s)) { - f3.start(f1.transport.threadPool()); + ProtonConfigFetcher(ConfigUri(f1.configId, f1.context), f2, 60s)) { + f3.start(); ASSERT_FALSE(f2.getDocumentDBConfig("typea")); // Add db and verify that config for db is provided |