diff --git a/src/jaegertracing/ConfigTest.cpp b/src/jaegertracing/ConfigTest.cpp index 1b0b4481..7a4073e4 100644 --- a/src/jaegertracing/ConfigTest.cpp +++ b/src/jaegertracing/ConfigTest.cpp @@ -73,6 +73,20 @@ TEST(Config, testDefaultSamplingProbability) Config().sampler().param()); } +TEST(Config, testZeroSamplingParam) +{ + { + constexpr auto kConfigYAML = R"cfg( +disabled: true +sampler: + type: const + param: 0 +)cfg"; + const auto config = Config::parse(YAML::Load(kConfigYAML)); + ASSERT_EQ(0, config.sampler().param()); + } +} + #endif // JAEGERTRACING_WITH_YAML_CPP } // namespace jaegertracing