summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/flushengine/flushengine_test.cpp
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2021-01-06 13:36:23 +0100
committerTor Egge <Tor.Egge@broadpark.no>2021-01-06 13:39:43 +0100
commitde1d36b97e0109229e46f2617432bea6c31a5132 (patch)
tree53248f21c4ccff84bcd2e541b7c2e84eaf49f0c6 /searchcore/src/tests/proton/flushengine/flushengine_test.cpp
parent293ea711b89d760bdea84f22d1b66ff94dad6667 (diff)
Wire in use of flush tokens for flush targets.
Diffstat (limited to 'searchcore/src/tests/proton/flushengine/flushengine_test.cpp')
-rw-r--r--searchcore/src/tests/proton/flushengine/flushengine_test.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/searchcore/src/tests/proton/flushengine/flushengine_test.cpp b/searchcore/src/tests/proton/flushengine/flushengine_test.cpp
index 38fca35ea87..a675a45aa54 100644
--- a/searchcore/src/tests/proton/flushengine/flushengine_test.cpp
+++ b/searchcore/src/tests/proton/flushengine/flushengine_test.cpp
@@ -9,6 +9,7 @@
#include <vespa/searchcore/proton/server/igetserialnum.h>
#include <vespa/searchcore/proton/test/dummy_flush_handler.h>
#include <vespa/searchcore/proton/test/dummy_flush_target.h>
+#include <vespa/searchlib/common/flush_token.h>
#include <vespa/vespalib/data/slime/slime.h>
#include <vespa/vespalib/test/insertion_operators.h>
#include <vespa/vespalib/testkit/testapp.h>
@@ -101,9 +102,9 @@ public:
{
}
- Task::UP initFlush(SerialNum currentSerial) override
+ Task::UP initFlush(SerialNum currentSerial, std::shared_ptr<search::IFlushToken> flush_token) override
{
- Task::UP task(_target->initFlush(currentSerial));
+ Task::UP task(_target->initFlush(currentSerial, std::move(flush_token)));
if (task) {
return std::make_unique<WrappedFlushTask>(std::move(task),
_handler);
@@ -287,7 +288,7 @@ public:
return _flushedSerial;
}
- Task::UP initFlush(SerialNum currentSerial) override {
+ Task::UP initFlush(SerialNum currentSerial, std::shared_ptr<search::IFlushToken>) override {
LOG(info, "SimpleTarget(%s)::initFlush(%" PRIu64 ")", getName().c_str(), currentSerial);
_currentSerial = currentSerial;
_initDone.countDown();
@@ -639,7 +640,7 @@ TEST("require that threaded target works")
auto target = std::make_shared<ThreadedFlushTarget>(executor, getSerialNum, std::make_shared<SimpleTarget>());
EXPECT_FALSE(executor._done.await(SHORT_TIMEOUT));
- EXPECT_TRUE(target->initFlush(0).get() != NULL);
+ EXPECT_TRUE(target->initFlush(0, std::make_shared<search::FlushToken>()).get() != NULL);
EXPECT_TRUE(executor._done.await(LONG_TIMEOUT));
}