diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-02-22 16:28:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-22 16:28:51 +0100 |
commit | 7f80d9bdc076912e493a895daba92b25c6b7ec0e (patch) | |
tree | d16ea5c4b71a8857a3ccc2d4da679156a9740ed2 /searchcore/src/tests/proton/index/fusionrunner_test.cpp | |
parent | f859f58e988c61b0c16f4ed4eb9aaa5daca1661d (diff) |
Revert "Revert "Use common tranport for TlsClient""
Diffstat (limited to 'searchcore/src/tests/proton/index/fusionrunner_test.cpp')
-rw-r--r-- | searchcore/src/tests/proton/index/fusionrunner_test.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/searchcore/src/tests/proton/index/fusionrunner_test.cpp b/searchcore/src/tests/proton/index/fusionrunner_test.cpp index ae85211fe24..38314abd7e5 100644 --- a/searchcore/src/tests/proton/index/fusionrunner_test.cpp +++ b/searchcore/src/tests/proton/index/fusionrunner_test.cpp @@ -2,7 +2,7 @@ #include <vespa/fastos/file.h> #include <vespa/searchcore/proton/index/indexmanager.h> -#include <vespa/searchcore/proton/server/executorthreadingservice.h> +#include <vespa/searchcore/proton/test/transport_helper.h> #include <vespa/searchcorespi/index/fusionrunner.h> #include <vespa/vespalib/util/isequencedtaskexecutor.h> #include <vespa/searchlib/common/flush_token.h> @@ -17,6 +17,7 @@ #include <vespa/vespalib/util/gate.h> #include <vespa/vespalib/util/destructor_callbacks.h> #include <vespa/vespalib/testkit/testapp.h> +#include <vespa/vespalib/util/size_literals.h> #include <set> using document::Document; @@ -66,8 +67,7 @@ class Test : public vespalib::TestApp { FixedSourceSelector::UP _selector; FusionSpec _fusion_spec; DummyFileHeaderContext _fileHeaderContext; - vespalib::ThreadStackExecutor _sharedExecutor; - ExecutorThreadingService _threadingService; + TransportAndExecutorService _service; IndexManager::MaintainerOperations _ops; void setUp(); @@ -85,21 +85,21 @@ class Test : public vespalib::TestApp { void requireThatFusionCanBeStopped(); public: - Test() - : _fusion_runner(), - _selector(), - _fusion_spec(), - _fileHeaderContext(), - _sharedExecutor(1, 0x10000), - _threadingService(_sharedExecutor), - _ops(_fileHeaderContext, - TuneFileIndexManager(), 0, - _threadingService) - {} - ~Test() {} + Test(); + ~Test(); int Main() override; }; +Test::Test() + : _fusion_runner(), + _selector(), + _fusion_spec(), + _fileHeaderContext(), + _service(1), + _ops(_fileHeaderContext,TuneFileIndexManager(), 0, _service.write()) +{ } +Test::~Test() = default; + int Test::Main() { @@ -180,8 +180,8 @@ void Test::createIndex(const string &dir, uint32_t id, bool fusion) { Schema schema = getSchema(); DocBuilder doc_builder(schema); MemoryIndex memory_index(schema, MockFieldLengthInspector(), - _threadingService.indexFieldInverter(), - _threadingService.indexFieldWriter()); + _service.write().indexFieldInverter(), + _service.write().indexFieldWriter()); addDocument(doc_builder, memory_index, *_selector, id, id + 0, term); addDocument(doc_builder, memory_index, *_selector, id, id + 1, "bar"); addDocument(doc_builder, memory_index, *_selector, id, id + 2, "baz"); |