summaryrefslogtreecommitdiffstats
path: root/storage/src/tests/distributor/bucketdbupdatertest.cpp
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2018-02-26 11:18:53 +0000
committerTor Egge <Tor.Egge@oath.com>2018-02-26 12:07:31 +0000
commit22c8bbe1867c0e711189578306f945bfb9c299b6 (patch)
tree1cb4101dddf80dfa24ad0abe1ffa6f3a05347823 /storage/src/tests/distributor/bucketdbupdatertest.cpp
parentd4397003e0c2dffafc43c31436cca30ab4c0d35d (diff)
Use ClusterState from DistributorBucketSpace in PendingBucketSpaceDbTransition.
Diffstat (limited to 'storage/src/tests/distributor/bucketdbupdatertest.cpp')
-rw-r--r--storage/src/tests/distributor/bucketdbupdatertest.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/storage/src/tests/distributor/bucketdbupdatertest.cpp b/storage/src/tests/distributor/bucketdbupdatertest.cpp
index 7831328460d..08262e30fe6 100644
--- a/storage/src/tests/distributor/bucketdbupdatertest.cpp
+++ b/storage/src/tests/distributor/bucketdbupdatertest.cpp
@@ -182,12 +182,17 @@ protected:
bool bucketExistsThatHasNode(int bucketCount, uint16_t node) const;
- ClusterInformation::CSP createClusterInfo(const std::string& clusterState) {
+ ClusterInformation::CSP createClusterInfo(const std::string& clusterStateString) {
+ auto clusterState = std::make_shared<lib::ClusterState>(clusterStateString);
ClusterInformation::CSP clusterInfo(
new SimpleClusterInformation(
getBucketDBUpdater().getDistributorComponent().getIndex(),
- lib::ClusterState(clusterState),
+ *clusterState,
"ui"));
+ auto &repo = getBucketSpaceRepo();
+ for (auto &elem : repo) {
+ elem.second->setClusterState(clusterState);
+ }
return clusterInfo;
}