aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/tests/distributor
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-08-08 21:19:54 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-08-08 21:19:54 +0000
commite5a0b4377d45eaf4a1f999b64addb28e8388e847 (patch)
tree76115f757c75a8dfdf27f9e77174a5d4346564c5 /storage/src/tests/distributor
parentb479f5b2a572a8a75cf14ca12016b38f2ff05b76 (diff)
Unify on a single definition of MinReplicaMap
Diffstat (limited to 'storage/src/tests/distributor')
-rw-r--r--storage/src/tests/distributor/bucketdbmetricupdatertest.cpp2
-rw-r--r--storage/src/tests/distributor/distributor_host_info_reporter_test.cpp4
-rw-r--r--storage/src/tests/distributor/top_level_distributor_test.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/storage/src/tests/distributor/bucketdbmetricupdatertest.cpp b/storage/src/tests/distributor/bucketdbmetricupdatertest.cpp
index ab4ff881d90..4d04e3ca51a 100644
--- a/storage/src/tests/distributor/bucketdbmetricupdatertest.cpp
+++ b/storage/src/tests/distributor/bucketdbmetricupdatertest.cpp
@@ -18,7 +18,7 @@ struct BucketDBMetricUpdaterTest : Test {
void visitBucketWith2CopiesBothTrusted(BucketDBMetricUpdater& metricUpdater);
void visitBucketWith1Copy(BucketDBMetricUpdater& metricUpdater);
- using NodeToReplicasMap = std::unordered_map<uint16_t, uint32_t>;
+ using NodeToReplicasMap = MinReplicaMap;
NodeToReplicasMap replicaStatsOf(BucketDBMetricUpdater& metricUpdater);
BucketDBMetricUpdaterTest();
diff --git a/storage/src/tests/distributor/distributor_host_info_reporter_test.cpp b/storage/src/tests/distributor/distributor_host_info_reporter_test.cpp
index 6dfab5abc21..a72dfec2d94 100644
--- a/storage/src/tests/distributor/distributor_host_info_reporter_test.cpp
+++ b/storage/src/tests/distributor/distributor_host_info_reporter_test.cpp
@@ -14,7 +14,7 @@ namespace storage::distributor {
using End = vespalib::JsonStream::End;
using File = vespalib::File;
-using MinReplicaStats = std::unordered_map<uint16_t, uint32_t>;
+using MinReplicaStats = MinReplicaMap;
using Object = vespalib::JsonStream::Object;
using PerNodeBucketSpacesStats = BucketSpacesStatsProvider::PerNodeBucketSpacesStats;
using BucketSpacesStats = BucketSpacesStatsProvider::BucketSpacesStats;
@@ -36,7 +36,7 @@ struct MockedMinReplicaProvider : MinReplicaProvider
MinReplicaStats minReplica;
~MockedMinReplicaProvider() override;
- std::unordered_map<uint16_t, uint32_t> getMinReplica() const override {
+ MinReplicaMap getMinReplica() const override {
return minReplica;
}
};
diff --git a/storage/src/tests/distributor/top_level_distributor_test.cpp b/storage/src/tests/distributor/top_level_distributor_test.cpp
index dad6f477d83..94f8821f9c8 100644
--- a/storage/src/tests/distributor/top_level_distributor_test.cpp
+++ b/storage/src/tests/distributor/top_level_distributor_test.cpp
@@ -92,7 +92,7 @@ struct TopLevelDistributorTest : Test, TopLevelDistributorTestUtil {
return _distributor->getBucketSpacesStats();
}
- std::unordered_map<uint16_t, uint32_t> distributor_min_replica_stats() {
+ MinReplicaMap distributor_min_replica_stats() {
return _distributor->getMinReplica();
}
@@ -504,7 +504,7 @@ void assert_invalid_bucket_stats_for_all_spaces(
ASSERT_FALSE(space_iter->second.valid());
}
-void assert_min_replica_stats_zeroed(const std::unordered_map<uint16_t, uint32_t>& stats, uint16_t node_index) {
+void assert_min_replica_stats_zeroed(const MinReplicaMap & stats, uint16_t node_index) {
auto iter = stats.find(node_index);
ASSERT_TRUE(iter != stats.cend());
EXPECT_EQ(iter->second, 0);