diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2021-01-20 10:50:38 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2021-01-20 10:50:38 +0100 |
commit | 13691cfa6d95bd663588f04f58e87a36eee68e48 (patch) | |
tree | 4edac6be0d2c1294e67e9cb8c905fd6f8153b50b /storage/src/tests/common | |
parent | 47cebacad17e3760d0235e360a45a5d2e02a6419 (diff) |
Add ServiceLayerHostInfoReporter.
Diffstat (limited to 'storage/src/tests/common')
-rw-r--r-- | storage/src/tests/common/testnodestateupdater.cpp | 3 | ||||
-rw-r--r-- | storage/src/tests/common/testnodestateupdater.h | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/storage/src/tests/common/testnodestateupdater.cpp b/storage/src/tests/common/testnodestateupdater.cpp index c4afda1a5ad..27f21a31768 100644 --- a/storage/src/tests/common/testnodestateupdater.cpp +++ b/storage/src/tests/common/testnodestateupdater.cpp @@ -10,7 +10,8 @@ TestNodeStateUpdater::TestNodeStateUpdater(const lib::NodeType& type) _current(new lib::NodeState(type, lib::State::UP)), _clusterStateBundle(std::make_shared<const lib::ClusterStateBundle>(lib::ClusterState())), _listeners(), - _explicit_node_state_reply_send_invocations(0) + _explicit_node_state_reply_send_invocations(0), + _requested_almost_immediate_node_state_replies(0) { } TestNodeStateUpdater::~TestNodeStateUpdater() = default; diff --git a/storage/src/tests/common/testnodestateupdater.h b/storage/src/tests/common/testnodestateupdater.h index e0c636d2715..eb15b97a37f 100644 --- a/storage/src/tests/common/testnodestateupdater.h +++ b/storage/src/tests/common/testnodestateupdater.h @@ -19,6 +19,7 @@ struct TestNodeStateUpdater : public NodeStateUpdater std::shared_ptr<const lib::ClusterStateBundle> _clusterStateBundle; std::vector<StateListener*> _listeners; size_t _explicit_node_state_reply_send_invocations; + size_t _requested_almost_immediate_node_state_replies; public: explicit TestNodeStateUpdater(const lib::NodeType& type); @@ -37,6 +38,10 @@ public: ++_explicit_node_state_reply_send_invocations; } + void request_almost_immediate_node_state_replies() override { + ++_requested_almost_immediate_node_state_replies; + } + void setCurrentNodeState(const lib::NodeState& state) { _current = std::make_shared<lib::NodeState>(state); } @@ -47,6 +52,10 @@ public: size_t explicit_node_state_reply_send_invocations() const noexcept { return _explicit_node_state_reply_send_invocations; } + + size_t requested_almost_immediate_node_state_replies() const noexcept { + return _requested_almost_immediate_node_state_replies; + } }; } // storage |