From 36dec11bc6401897b75286d552716927da6c3c5e Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Sun, 4 Sep 2022 22:15:14 -0700 Subject: [PATCH] Disable RateLimiterTest.Rate with valgrind (#10637) Summary: Example valgrind flake: https://app.circleci.com/pipelines/github/facebook/rocksdb/18073/workflows/3794e569-45cb-4621-a2b4-df1dcdf5cb19/jobs/475569 ``` util/rate_limiter_test.cc:358 Expected equality of these values: samples_at_minimum Which is: 9 samples Which is: 10 ``` Some other runs of `RateLimiterTest.Rate` already skip this check due to its reliance on a minimum execution speed. We know valgrind slows execution a lot so can disable the check in that case. Pull Request resolved: https://github.com/facebook/rocksdb/pull/10637 Reviewed By: cbi42 Differential Revision: D39251350 Pulled By: ajkr fbshipit-source-id: 41ae1ea4cd91992ea57df902f9f7fd6d182a5932 --- util/rate_limiter_test.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util/rate_limiter_test.cc b/util/rate_limiter_test.cc index 5e97c6614..df83287e9 100644 --- a/util/rate_limiter_test.cc +++ b/util/rate_limiter_test.cc @@ -344,9 +344,10 @@ TEST_F(RateLimiterTest, Rate) { } } - // This can fail in heavily loaded CI environments + // This can fail due to slow execution speed, like when using valgrind or in + // heavily loaded CI environments bool skip_minimum_rate_check = -#if defined(CIRCLECI) && defined(OS_MACOSX) +#if (defined(CIRCLECI) && defined(OS_MACOSX)) || defined(ROCKSDB_VALGRIND_RUN) true; #else getenv("SANDCASTLE");