summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/maintenancecontroller
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-04-21 21:41:32 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-04-21 21:41:32 +0200
commitf29aa00c323095f526a40b1fb4ad48ba96a1e58e (patch)
tree18eaa71c2c99bde6ba9b475aba2d9140fd6b2732 /searchcore/src/tests/proton/documentdb/maintenancecontroller
parent8783a8eb35c547bf9700965863c98edc73d3c047 (diff)
Must use a separate executor. Can not run the config change in the generic executor given to the maintenance controller.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/maintenancecontroller')
-rw-r--r--searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
index d2564c80f11..4ed6953ca14 100644
--- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
@@ -420,6 +420,7 @@ class MaintenanceControllerFixture : public ICommitable
{
public:
MyExecutor _executor;
+ MyExecutor _genericExecutor;
ExecutorThreadService _threadService;
DocTypeName _docTypeName;
test::UserDocumentsBuilder _builder;
@@ -910,6 +911,7 @@ MyExecutor::waitIdle(double timeout)
MaintenanceControllerFixture::MaintenanceControllerFixture()
: _executor(),
+ _genericExecutor(),
_threadService(_executor),
_docTypeName("searchdocument"), // must match document builder
_builder(),
@@ -932,7 +934,7 @@ MaintenanceControllerFixture::MaintenanceControllerFixture()
_readyAttributeManager(std::make_shared<MyAttributeManager>()),
_notReadyAttributeManager(std::make_shared<MyAttributeManager>()),
_attributeUsageFilter(),
- _mc(_threadService, _executor, _docTypeName)
+ _mc(_threadService, _genericExecutor, _docTypeName)
{
std::vector<MyDocumentSubDB *> subDBs;
subDBs.push_back(&_ready);
@@ -1492,7 +1494,7 @@ TEST_F("Require that maintenance jobs are run by correct executor", MaintenanceC
auto jobs = f._mc.getJobList();
EXPECT_EQUAL(6u, jobs.size());
EXPECT_TRUE(containsJobAndExecutedBy(jobs, "heart_beat", f._threadService));
- EXPECT_TRUE(containsJobAndExecutedBy(jobs, "prune_session_cache", f._executor));
+ EXPECT_TRUE(containsJobAndExecutedBy(jobs, "prune_session_cache", f._genericExecutor));
EXPECT_TRUE(containsJobAndExecutedBy(jobs, "wipe_old_removed_fields", f._threadService));
EXPECT_TRUE(containsJobAndExecutedBy(jobs, "prune_removed_documents.searchdocument", f._threadService));
EXPECT_TRUE(containsJobAndExecutedBy(jobs, "move_buckets.searchdocument", f._threadService));