summaryrefslogtreecommitdiffstats
path: root/storage/src/tests/distributor/distributor_stripe_test.cpp
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2023-05-08 09:46:36 +0000
committerTor Brede Vekterli <vekterli@yahooinc.com>2023-05-08 09:46:36 +0000
commitcdd8a811a50cced472ed639fa3c907e2c03a6432 (patch)
tree01ecc7086404934f0c8460e40ae7f2c2e62a9e14 /storage/src/tests/distributor/distributor_stripe_test.cpp
parent005d0b28426912fb7c77fb29ad2760f41112e3f4 (diff)
Add and wire in condition probing configuration
Diffstat (limited to 'storage/src/tests/distributor/distributor_stripe_test.cpp')
-rw-r--r--storage/src/tests/distributor/distributor_stripe_test.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/storage/src/tests/distributor/distributor_stripe_test.cpp b/storage/src/tests/distributor/distributor_stripe_test.cpp
index 73ff0f22614..2130c6ae62d 100644
--- a/storage/src/tests/distributor/distributor_stripe_test.cpp
+++ b/storage/src/tests/distributor/distributor_stripe_test.cpp
@@ -197,6 +197,12 @@ struct DistributorStripeTest : Test, DistributorStripeTestUtil {
configure_stripe(builder);
}
+ void configure_enable_condition_probing(bool enable_probing) {
+ ConfigBuilder builder;
+ builder.enableConditionProbing = enable_probing;
+ configure_stripe(builder);
+ }
+
bool scheduler_has_implicitly_clear_priority_on_schedule_set() const noexcept {
return _stripe->_scheduler->implicitly_clear_priority_on_schedule();
}
@@ -1031,4 +1037,17 @@ TEST_F(DistributorStripeTest, enable_two_phase_gc_config_is_propagated_to_intern
EXPECT_FALSE(getConfig().enable_two_phase_garbage_collection());
}
+TEST_F(DistributorStripeTest, enable_condition_probing_config_is_propagated_to_internal_config)
+{
+ setup_stripe(Redundancy(1), NodeCount(1), "distributor:1 storage:1");
+
+ EXPECT_FALSE(getConfig().enable_condition_probing());
+
+ configure_enable_condition_probing(true);
+ EXPECT_TRUE(getConfig().enable_condition_probing());
+
+ configure_enable_condition_probing(false);
+ EXPECT_FALSE(getConfig().enable_condition_probing());
+}
+
}