feat: ETLng cleanup and graceful shutdown (#2232)

This commit is contained in:
Alex Kremer
2025-06-18 21:40:11 +01:00
committed by GitHub
parent 2c6f52a0ed
commit 63ec563135
23 changed files with 338 additions and 105 deletions

View File

@@ -42,7 +42,7 @@ struct MockNgLoadBalancer : etlng::LoadBalancerInterface {
using RawLedgerObjectType = FakeLedgerObject;
MOCK_METHOD(
std::vector<std::string>,
etlng::InitialLedgerLoadResult,
loadInitialLedger,
(uint32_t, etlng::InitialLoadObserverInterface&, std::chrono::steady_clock::duration),
(override)

View File

@@ -20,6 +20,7 @@
#include "etl/NetworkValidatedLedgersInterface.hpp"
#include "etlng/InitialLoadObserverInterface.hpp"
#include "etlng/LoadBalancerInterface.hpp"
#include "etlng/Source.hpp"
#include "feed/SubscriptionManagerInterface.hpp"
#include "rpc/Errors.hpp"
@@ -61,7 +62,7 @@ struct MockSourceNg : etlng::SourceBase {
(override)
);
MOCK_METHOD(
(std::pair<std::vector<std::string>, bool>),
etlng::InitialLedgerLoadResult,
loadInitialLedger,
(uint32_t, uint32_t, etlng::InitialLoadObserverInterface&),
(override)
@@ -136,7 +137,7 @@ public:
return mock_->fetchLedger(sequence, getObjects, getObjectNeighbors);
}
std::pair<std::vector<std::string>, bool>
etlng::InitialLedgerLoadResult
loadInitialLedger(uint32_t sequence, uint32_t maxLedger, etlng::InitialLoadObserverInterface& observer) override
{
return mock_->loadInitialLedger(sequence, maxLedger, observer);