aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/threading_service_config/threading_service_config_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/threading_service_config/threading_service_config_test.cpp')
-rw-r--r--searchcore/src/tests/proton/documentdb/threading_service_config/threading_service_config_test.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/searchcore/src/tests/proton/documentdb/threading_service_config/threading_service_config_test.cpp b/searchcore/src/tests/proton/documentdb/threading_service_config/threading_service_config_test.cpp
index 353ebeb3abc..50a8349b859 100644
--- a/searchcore/src/tests/proton/documentdb/threading_service_config/threading_service_config_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/threading_service_config/threading_service_config_test.cpp
@@ -14,15 +14,15 @@ using ProtonConfigBuilder = vespa::config::search::core::ProtonConfigBuilder;
struct Fixture {
ProtonConfig cfg;
- Fixture(uint32_t baseLineIndexingThreads = 2, uint32_t task_limit = 500, uint32_t semi_unbound_task_limit = 50000)
- : cfg(makeConfig(baseLineIndexingThreads, task_limit, semi_unbound_task_limit))
+ Fixture(uint32_t baseLineIndexingThreads = 2, uint32_t master_task_limit = 2000, uint32_t task_limit = 500)
+ : cfg(makeConfig(baseLineIndexingThreads, master_task_limit, task_limit))
{
}
- ProtonConfig makeConfig(uint32_t baseLineIndexingThreads, uint32_t task_limit, uint32_t semi_unbound_task_limit) {
+ ProtonConfig makeConfig(uint32_t baseLineIndexingThreads, uint32_t master_task_limit, uint32_t task_limit) {
ProtonConfigBuilder builder;
builder.indexing.threads = baseLineIndexingThreads;
builder.indexing.tasklimit = task_limit;
- builder.indexing.semiunboundtasklimit = semi_unbound_task_limit;
+ builder.feeding.masterTaskLimit = master_task_limit;
return builder;
}
ThreadingServiceConfig make(uint32_t cpuCores) {
@@ -51,28 +51,32 @@ TEST_F("require that indexing threads is always >= 1", Fixture(0))
TEST_DO(f.assertIndexingThreads(1, 0));
}
-TEST_F("require that default task limit is set", Fixture)
+TEST_F("require that task limits are set", Fixture)
{
- EXPECT_EQUAL(500u, f.make(24).defaultTaskLimit());
+ auto tcfg = f.make(24);
+ EXPECT_EQUAL(2000u, tcfg.master_task_limit());
+ EXPECT_EQUAL(500u, tcfg.defaultTaskLimit());
}
namespace {
-void assertConfig(uint32_t exp_indexing_threads, uint32_t exp_default_task_limit, const ThreadingServiceConfig &config) {
+void assertConfig(uint32_t exp_indexing_threads, uint32_t exp_master_task_limit,
+ uint32_t exp_default_task_limit, const ThreadingServiceConfig& config) {
EXPECT_EQUAL(exp_indexing_threads, config.indexingThreads());
+ EXPECT_EQUAL(exp_master_task_limit, config.master_task_limit());
EXPECT_EQUAL(exp_default_task_limit, config.defaultTaskLimit());
}
}
-TEST_FF("require that config can be somewhat updated", Fixture(), Fixture(2, 1000, 100000))
+TEST_FF("require that config can be somewhat updated", Fixture(), Fixture(2, 3000, 1000))
{
auto cfg1 = f1.make(1);
- assertConfig(2u, 500u, cfg1);
+ assertConfig(2u, 2000, 500u, cfg1);
const auto cfg2 = f2.make(13);
- assertConfig(3u, 1000u, cfg2);
+ assertConfig(3u, 3000u, 1000u, cfg2);
cfg1.update(cfg2);
- assertConfig(2u, 1000u, cfg1); // Indexing threads not changed
+ assertConfig(2u, 3000u, 1000u, cfg1); // Indexing threads not changed
}
TEST_MAIN()