diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-09-05 11:14:42 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-09-05 11:14:42 +0000 |
commit | ec257d203005f6f7289f2380573eade69b528026 (patch) | |
tree | 1d79ab0e545a47f11014e4a7ac470285e4ee369c /storage | |
parent | 0ac1037b7482c0c171d66625ad7ab23dfe2bec8a (diff) |
Reformat
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/tests/distributor/top_level_bucket_db_updater_test.cpp | 80 |
1 files changed, 53 insertions, 27 deletions
diff --git a/storage/src/tests/distributor/top_level_bucket_db_updater_test.cpp b/storage/src/tests/distributor/top_level_bucket_db_updater_test.cpp index 2ed19247fdd..d3af4cd564a 100644 --- a/storage/src/tests/distributor/top_level_bucket_db_updater_test.cpp +++ b/storage/src/tests/distributor/top_level_bucket_db_updater_test.cpp @@ -1404,62 +1404,85 @@ TopLevelBucketDBUpdaterTest::get_sent_nodes_distribution_changed(const std::stri TEST_F(TopLevelBucketDBUpdaterTest, pending_cluster_state_send_messages) { EXPECT_EQ(get_node_list({0, 1, 2}), - get_sent_nodes("cluster:d", "distributor:1 storage:3")); + get_sent_nodes("cluster:d", + "distributor:1 storage:3")); EXPECT_EQ(get_node_list({0, 1}), - get_sent_nodes("cluster:d", "distributor:1 storage:3 .2.s:m")); + get_sent_nodes("cluster:d", + "distributor:1 storage:3 .2.s:m")); EXPECT_EQ(get_node_list({2}), - get_sent_nodes("distributor:1 storage:2", "distributor:1 storage:3")); + get_sent_nodes("distributor:1 storage:2", + "distributor:1 storage:3")); EXPECT_EQ(get_node_list({2, 3, 4, 5}), - get_sent_nodes("distributor:1 storage:2", "distributor:1 storage:6")); + get_sent_nodes("distributor:1 storage:2", + "distributor:1 storage:6")); EXPECT_EQ(get_node_list({0, 1, 2}), - get_sent_nodes("distributor:4 storage:3", "distributor:3 storage:3")); + get_sent_nodes("distributor:4 storage:3", + "distributor:3 storage:3")); EXPECT_EQ(get_node_list({0, 1, 2, 3}), - get_sent_nodes("distributor:4 storage:3", "distributor:4 .2.s:d storage:4")); + get_sent_nodes("distributor:4 storage:3", + "distributor:4 .2.s:d storage:4")); - EXPECT_TRUE(get_sent_nodes("distributor:4 storage:3", "distributor:4 .0.s:d storage:4").empty()); - EXPECT_TRUE(get_sent_nodes("distributor:3 storage:3", "distributor:4 storage:3").empty()); + EXPECT_TRUE(get_sent_nodes("distributor:4 storage:3", + "distributor:4 .0.s:d storage:4").empty()); + EXPECT_TRUE(get_sent_nodes("distributor:3 storage:3", + "distributor:4 storage:3").empty()); EXPECT_EQ(get_node_list({2}), - get_sent_nodes("distributor:3 storage:3 .2.s:i", "distributor:3 storage:3")); + get_sent_nodes("distributor:3 storage:3 .2.s:i", + "distributor:3 storage:3")); EXPECT_EQ(get_node_list({1}), - get_sent_nodes("distributor:3 storage:3 .1.s:d", "distributor:3 storage:3")); + get_sent_nodes("distributor:3 storage:3 .1.s:d", + "distributor:3 storage:3")); EXPECT_EQ(get_node_list({1, 2, 4}), - get_sent_nodes("distributor:3 storage:4 .1.s:d .2.s:i", "distributor:3 storage:5")); - - EXPECT_TRUE(get_sent_nodes("distributor:1 storage:3", "cluster:d").empty()); - EXPECT_TRUE(get_sent_nodes("distributor:1 storage:3", "distributor:1 storage:3").empty()); - EXPECT_TRUE(get_sent_nodes("distributor:1 storage:3", "cluster:d distributor:1 storage:6").empty()); - EXPECT_TRUE(get_sent_nodes("distributor:3 storage:3", "distributor:3 .2.s:m storage:3").empty()); + get_sent_nodes("distributor:3 storage:4 .1.s:d .2.s:i", + "distributor:3 storage:5")); + + EXPECT_TRUE(get_sent_nodes("distributor:1 storage:3", + "cluster:d").empty()); + EXPECT_TRUE(get_sent_nodes("distributor:1 storage:3", + "distributor:1 storage:3").empty()); + EXPECT_TRUE(get_sent_nodes("distributor:1 storage:3", + "cluster:d distributor:1 storage:6").empty()); + EXPECT_TRUE(get_sent_nodes("distributor:3 storage:3", + "distributor:3 .2.s:m storage:3").empty()); EXPECT_EQ(get_node_list({0, 1, 2}), - get_sent_nodes("distributor:3 .2.s:m storage:3", "distributor:3 .2.s:d storage:3")); + get_sent_nodes("distributor:3 .2.s:m storage:3", + "distributor:3 .2.s:d storage:3")); - EXPECT_TRUE(get_sent_nodes("distributor:3 .2.s:m storage:3", "distributor:3 storage:3").empty()); + EXPECT_TRUE(get_sent_nodes("distributor:3 .2.s:m storage:3", + "distributor:3 storage:3").empty()); EXPECT_EQ(get_node_list({0, 1, 2}), get_sent_nodes_distribution_changed("distributor:3 storage:3")); EXPECT_EQ(get_node_list({0, 1}), - get_sent_nodes("distributor:10 storage:2", "distributor:10 .1.s:d storage:2")); + get_sent_nodes("distributor:10 storage:2", + "distributor:10 .1.s:d storage:2")); - EXPECT_TRUE(get_sent_nodes("distributor:2 storage:2", "distributor:3 .2.s:i storage:2").empty()); + EXPECT_TRUE(get_sent_nodes("distributor:2 storage:2", + "distributor:3 .2.s:i storage:2").empty()); EXPECT_EQ(get_node_list({0, 1, 2}), - get_sent_nodes("distributor:3 storage:3", "distributor:3 .2.s:s storage:3")); + get_sent_nodes("distributor:3 storage:3", + "distributor:3 .2.s:s storage:3")); - EXPECT_TRUE(get_sent_nodes("distributor:3 .2.s:s storage:3", "distributor:3 .2.s:d storage:3").empty()); + EXPECT_TRUE(get_sent_nodes("distributor:3 .2.s:s storage:3", + "distributor:3 .2.s:d storage:3").empty()); EXPECT_EQ(get_node_list({1}), - get_sent_nodes("distributor:3 storage:3 .1.s:m", "distributor:3 storage:3")); + get_sent_nodes("distributor:3 storage:3 .1.s:m", + "distributor:3 storage:3")); - EXPECT_TRUE(get_sent_nodes("distributor:3 storage:3", "distributor:3 storage:3 .1.s:m").empty()); + EXPECT_TRUE(get_sent_nodes("distributor:3 storage:3", + "distributor:3 storage:3 .1.s:m").empty()); }; TEST_F(TopLevelBucketDBUpdaterTest, pending_cluster_state_receive) { @@ -1506,10 +1529,12 @@ TEST_F(TopLevelBucketDBUpdaterTest, pending_cluster_state_with_group_down) { // Entire group 1 goes down. Must refetch from all nodes. EXPECT_EQ(get_node_list({0, 1, 2, 3, 4, 5}), - get_sent_nodes("distributor:6 storage:6", "distributor:6 .2.s:d .3.s:d storage:6")); + get_sent_nodes("distributor:6 storage:6", + "distributor:6 .2.s:d .3.s:d storage:6")); // But don't fetch if not the entire group is down. - EXPECT_EQ("", get_sent_nodes("distributor:6 storage:6", "distributor:6 .2.s:d storage:6")); + EXPECT_EQ("", get_sent_nodes("distributor:6 storage:6", + "distributor:6 .2.s:d storage:6")); } TEST_F(TopLevelBucketDBUpdaterTest, pending_cluster_state_with_group_down_and_no_handover) { @@ -1519,7 +1544,8 @@ TEST_F(TopLevelBucketDBUpdaterTest, pending_cluster_state_with_group_down_and_no // Group is down, but config says to not do anything about it. EXPECT_EQ(get_node_list({0, 1, 2, 3, 4, 5}, _bucket_spaces.size() - 1), - get_sent_nodes("distributor:6 storage:6", "distributor:6 .2.s:d .3.s:d storage:6")); + get_sent_nodes("distributor:6 storage:6", + "distributor:6 .2.s:d .3.s:d storage:6")); } |