diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-02-27 16:43:55 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-02-27 16:49:17 +0000 |
commit | 752ced912014457c04d2c3670fd7d8b9eda49fa7 (patch) | |
tree | 404a21f60b4df37a1d4e718096eed971bf7522bc /searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp | |
parent | dda41637e506d6f0fdf88f875350adab2743bd1d (diff) |
Add getStats and setTaskLimit to interface to make it easy to swap implementation.
Also make do with ISequenceHandlerInterface.
Diffstat (limited to 'searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp')
-rw-r--r-- | searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp b/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp index ca45108b698..991cb2e519d 100644 --- a/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp +++ b/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp @@ -149,9 +149,9 @@ void Test::testSearch(Searchable &source, void Test::requireThatMemoryIndexCanBeDumpedAndSearched() { Schema schema = getSchema(); vespalib::ThreadStackExecutor sharedExecutor(2, 0x10000); - search::SequencedTaskExecutor indexFieldInverter(2); - search::SequencedTaskExecutor indexFieldWriter(2); - MemoryIndex memory_index(schema, MockFieldLengthInspector(), indexFieldInverter, indexFieldWriter); + auto indexFieldInverter = search::SequencedTaskExecutor::create(2); + auto indexFieldWriter = search::SequencedTaskExecutor::create(2); + MemoryIndex memory_index(schema, MockFieldLengthInspector(), *indexFieldInverter, *indexFieldWriter); DocBuilder doc_builder(schema); Document::UP doc = buildDocument(doc_builder, doc_id1, word1); @@ -160,7 +160,7 @@ void Test::requireThatMemoryIndexCanBeDumpedAndSearched() { doc = buildDocument(doc_builder, doc_id2, word2); memory_index.insertDocument(doc_id2, *doc.get()); memory_index.commit(std::shared_ptr<search::IDestructorCallback>()); - indexFieldWriter.sync(); + indexFieldWriter->sync(); testSearch(memory_index, word1, doc_id1); testSearch(memory_index, word2, doc_id2); |