diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-02-19 05:11:08 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-02-19 07:19:55 +0000 |
commit | d29666a12b9777829c328310ddff6af2580e59c5 (patch) | |
tree | 4c4b26c17af397fb6577cfa506c25e27bd24a41f /storage/src/tests/common | |
parent | 0be286e9026e96f8a1b032a2f2a08e943cf771ec (diff) |
- Reduce visibility of ClusterState and Distribution.
Diffstat (limited to 'storage/src/tests/common')
5 files changed, 11 insertions, 3 deletions
diff --git a/storage/src/tests/common/global_bucket_space_distribution_converter_test.cpp b/storage/src/tests/common/global_bucket_space_distribution_converter_test.cpp index 2103970a8f0..4eb8321699a 100644 --- a/storage/src/tests/common/global_bucket_space_distribution_converter_test.cpp +++ b/storage/src/tests/common/global_bucket_space_distribution_converter_test.cpp @@ -1,6 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/storage/common/global_bucket_space_distribution_converter.h> +#include <vespa/vdslib/distribution/distribution.h> #include <vespa/config/config.h> #include <vespa/vdslib/state/clusterstate.h> #include <vespa/vespalib/gtest/gtest.h> diff --git a/storage/src/tests/common/testnodestateupdater.cpp b/storage/src/tests/common/testnodestateupdater.cpp index 27f21a31768..ffa76af1e8a 100644 --- a/storage/src/tests/common/testnodestateupdater.cpp +++ b/storage/src/tests/common/testnodestateupdater.cpp @@ -2,6 +2,7 @@ #include "testnodestateupdater.h" #include <vespa/vdslib/state/cluster_state_bundle.h> +#include <vespa/vdslib/state/clusterstate.h> namespace storage { @@ -23,7 +24,7 @@ TestNodeStateUpdater::getClusterStateBundle() const } void -TestNodeStateUpdater::setClusterState(lib::ClusterState::CSP c) +TestNodeStateUpdater::setClusterState(std::shared_ptr<const lib::ClusterState> c) { setClusterStateBundle(std::make_shared<const lib::ClusterStateBundle>(*c)); } diff --git a/storage/src/tests/common/testnodestateupdater.h b/storage/src/tests/common/testnodestateupdater.h index eb15b97a37f..5bf48c46f1a 100644 --- a/storage/src/tests/common/testnodestateupdater.h +++ b/storage/src/tests/common/testnodestateupdater.h @@ -10,6 +10,10 @@ #include <vespa/storage/common/nodestateupdater.h> +namespace storage::lib { + class ClusterState; + class ClusterStateBundle; +} namespace storage { struct TestNodeStateUpdater : public NodeStateUpdater @@ -46,7 +50,7 @@ public: _current = std::make_shared<lib::NodeState>(state); } - void setClusterState(lib::ClusterState::CSP c); + void setClusterState(std::shared_ptr<const lib::ClusterState> c); void setClusterStateBundle(std::shared_ptr<const lib::ClusterStateBundle> clusterStateBundle); size_t explicit_node_state_reply_send_invocations() const noexcept { diff --git a/storage/src/tests/common/teststorageapp.cpp b/storage/src/tests/common/teststorageapp.cpp index f932786e2e2..e61050c21a3 100644 --- a/storage/src/tests/common/teststorageapp.cpp +++ b/storage/src/tests/common/teststorageapp.cpp @@ -7,6 +7,8 @@ #include <vespa/config-load-type.h> #include <vespa/config-fleetcontroller.h> #include <vespa/persistence/dummyimpl/dummypersistence.h> +#include <vespa/vdslib/distribution/distribution.h> +#include <vespa/vdslib/state/clusterstate.h> #include <vespa/vespalib/util/exceptions.h> #include <vespa/vespalib/util/time.h> #include <vespa/config/config.h> diff --git a/storage/src/tests/common/teststorageapp.h b/storage/src/tests/common/teststorageapp.h index 3742879bd30..9e273002580 100644 --- a/storage/src/tests/common/teststorageapp.h +++ b/storage/src/tests/common/teststorageapp.h @@ -84,7 +84,7 @@ public: const document::BucketIdFactory& getBucketIdFactory() { return _compReg.getBucketIdFactory(); } TestNodeStateUpdater& getStateUpdater() { return _nodeStateUpdater; } - lib::Distribution::SP getDistribution() + std::shared_ptr<lib::Distribution> & getDistribution() { return _compReg.getDistribution(); } TestNodeStateUpdater& getNodeStateUpdater() { return _nodeStateUpdater; } uint16_t getIndex() const { return _compReg.getIndex(); } |