summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb/executor_threading_service
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-02-21 17:38:47 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-02-22 10:06:57 +0000
commit3d159ee87f54409f0df2e306e698bb1381ec7365 (patch)
tree7e8b7efdc0d51b761e0988b20235fe9df978c300 /searchcore/src/tests/proton/documentdb/executor_threading_service
parenta7e8bb9dcf3c674a3756e0f0383384593856415a (diff)
- Use common tranport for TlsClient.
- Also refactor to simplify unit tests.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/executor_threading_service')
-rw-r--r--searchcore/src/tests/proton/documentdb/executor_threading_service/CMakeLists.txt1
-rw-r--r--searchcore/src/tests/proton/documentdb/executor_threading_service/executor_threading_service_test.cpp8
2 files changed, 6 insertions, 3 deletions
diff --git a/searchcore/src/tests/proton/documentdb/executor_threading_service/CMakeLists.txt b/searchcore/src/tests/proton/documentdb/executor_threading_service/CMakeLists.txt
index 721f2207213..ba7db5dd377 100644
--- a/searchcore/src/tests/proton/documentdb/executor_threading_service/CMakeLists.txt
+++ b/searchcore/src/tests/proton/documentdb/executor_threading_service/CMakeLists.txt
@@ -3,6 +3,7 @@ vespa_add_executable(searchcore_executor_threading_service_test_app TEST
SOURCES
executor_threading_service_test.cpp
DEPENDS
+ searchcore_test
searchcore_server
GTest::GTest
)
diff --git a/searchcore/src/tests/proton/documentdb/executor_threading_service/executor_threading_service_test.cpp b/searchcore/src/tests/proton/documentdb/executor_threading_service/executor_threading_service_test.cpp
index 8d7e842bc89..934dcdb36e3 100644
--- a/searchcore/src/tests/proton/documentdb/executor_threading_service/executor_threading_service_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/executor_threading_service/executor_threading_service_test.cpp
@@ -2,6 +2,7 @@
#include <vespa/searchcore/proton/server/executorthreadingservice.h>
#include <vespa/searchcore/proton/server/threading_service_config.h>
+#include <vespa/searchcore/proton/test/transport_helper.h>
#include <vespa/vespalib/gtest/gtest.h>
#include <vespa/vespalib/util/sequencedtaskexecutor.h>
@@ -20,17 +21,18 @@ to_concrete_type(ISequencedTaskExecutor& exec)
class ExecutorThreadingServiceTest : public ::testing::Test {
public:
- vespalib::ThreadStackExecutor shared_executor;
+ TransportAndExecutor _transport;
std::unique_ptr<ISequencedTaskExecutor> field_writer_executor;
std::unique_ptr<ExecutorThreadingService> service;
ExecutorThreadingServiceTest()
- : shared_executor(1, 1000),
+ : _transport(1),
field_writer_executor(SequencedTaskExecutor::create(my_field_writer_executor, 3, 200)),
service()
{
}
void setup(uint32_t indexing_threads, SharedFieldWriterExecutor shared_field_writer) {
- service = std::make_unique<ExecutorThreadingService>(shared_executor,
+ service = std::make_unique<ExecutorThreadingService>(_transport.shared(),
+ _transport.transport(),
field_writer_executor.get(),
nullptr,
ThreadingServiceConfig::make(indexing_threads, shared_field_writer));