diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-11-21 18:09:45 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-11-21 18:10:31 +0000 |
commit | f15ac6b4b06b166be53d8320dbabdfae4514af57 (patch) | |
tree | a6cdeb515de8d235e067e0fae8f44370ea0e1cf1 /searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp | |
parent | 1b0dd86621e151d1410307b8001945838029503e (diff) |
GC some unused code and less sync_all_executors.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp')
-rw-r--r-- | searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp index 977c899ab11..bffedfd8dab 100644 --- a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp +++ b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp @@ -185,13 +185,13 @@ struct MyFeedView : public test::DummyFeedView { int remove_count; int move_count; int prune_removed_count; + int update_count; SerialNum update_serial; const DocumentType *documentType; MyFeedView(const std::shared_ptr<const DocumentTypeRepo> &dtr, const DocTypeName &docTypeName); ~MyFeedView() override; - void resetPutLatch(uint32_t count) { putLatch = std::make_unique<vespalib::CountDownLatch>(count); } void preparePut(PutOperation &op) override { prepareDocumentOperation(op, op.getDocument()->getId().getGlobalId()); } @@ -389,16 +389,6 @@ FeedTokenContext::FeedTokenContext() FeedTokenContext::~FeedTokenContext() = default; -struct PutContext { - FeedTokenContext tokenCtx; - DocumentContext docCtx; - typedef std::shared_ptr<PutContext> SP; - PutContext(const vespalib::string &docId, DocBuilder &builder) : - tokenCtx(), - docCtx(docId, builder) - {} -}; - struct MyTlsWriter : TlsWriter { int store_count; int erase_count; @@ -455,40 +445,18 @@ struct FeedHandlerFixture } ~FeedHandlerFixture() { - writeService.sync_all_executors(); + writeService.shutdown(); } template <class FunctionType> inline void runAsMaster(FunctionType &&function) { writeService.master().execute(makeLambdaTask(std::move(function))); - writeService.master().sync(); + syncMaster(); } void syncMaster() { writeService.master().sync(); } }; - -struct MyConfigStore : ConfigStore { - SerialNum getBestSerialNum() const override { return 1; } - SerialNum getOldestSerialNum() const override { return 1; } - void saveConfig(const DocumentDBConfig &, SerialNum) override {} - void loadConfig(const DocumentDBConfig &, SerialNum, DocumentDBConfig::SP &) override {} - void removeInvalid() override {} - void prune(SerialNum) override {} - bool hasValidSerial(SerialNum) const override { return true; } - SerialNum getPrevValidSerial(SerialNum) const override { return 1; } - void serializeConfig(SerialNum, vespalib::nbostream &) override {} - void deserializeConfig(SerialNum, vespalib::nbostream &) override {} - void setProtonConfig(const ProtonConfigSP &) override { } -}; - - -struct ReplayTransactionLogContext { - MyConfigStore config_store; - DocumentDBConfig::SP cfgSnap; -}; - - TEST_F("require that heartBeat calls FeedView's heartBeat", FeedHandlerFixture) { |