This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new e0b577850 [util] SKIP_IF_SLOW_NOT_ALLOWED for some
BlockBloomFilterTest scenarios
e0b577850 is described below
commit e0b5778500e0052fec076bd95ebe8cb4646c8557
Author: Alexey Serbin <[email protected]>
AuthorDate: Thu Sep 7 12:07:04 2023 -0700
[util] SKIP_IF_SLOW_NOT_ALLOWED for some BlockBloomFilterTest scenarios
I noticed MinSpaceForFpp, MinSpaceMaxNdv, and FindInvalid scenarios of
the BlockBloomFilterTest suite running for quite a bit on a relatively
modern hardware (about 10, 3, and 30 seconds correspondingly), so it
makes sense to skip each of the scenarios unless KUDU_SLOW_TESTS_ALLOWED
is set.
This patch doesn't contain any functional modifications.
Change-Id: Ie154436bb043802c822f92e177ac090210ee7c1c
Reviewed-on: http://gerrit.cloudera.org:8080/20464
Reviewed-by: Mahesh Reddy <[email protected]>
Tested-by: Kudu Jenkins
Reviewed-by: Abhishek Chennaka <[email protected]>
---
src/kudu/util/block_bloom_filter-test.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/kudu/util/block_bloom_filter-test.cc
b/src/kudu/util/block_bloom_filter-test.cc
index 1b6878c80..9dcb934b7 100644
--- a/src/kudu/util/block_bloom_filter-test.cc
+++ b/src/kudu/util/block_bloom_filter-test.cc
@@ -22,7 +22,7 @@
#include <cstdlib>
#include <cstring>
#include <memory>
-#include <type_traits>
+#include <string>
#include <unordered_set>
#include <utility>
#include <vector>
@@ -182,6 +182,8 @@ TEST_F(BlockBloomFilterTest, CumulativeFind) {
// The empirical false positives we find when looking for random items is with
a constant
// factor of the false positive probability the Bloom filter was constructed
for.
TEST_F(BlockBloomFilterTest, FindInvalid) {
+ SKIP_IF_SLOW_NOT_ALLOWED();
+
// We use a deterministic pseudorandom number generator with a set seed. The
reason is
// that with a run-dependent seed, there will always be inputs that can
fail. That's a
// potential argument for this to be a benchmark rather than a test,
although the
@@ -236,6 +238,8 @@ TEST_F(BlockBloomFilterTest, FindInvalid) {
// Test that MaxNdv() and MinLogSpace() are dual
TEST_F(BlockBloomFilterTest, MinSpaceMaxNdv) {
+ SKIP_IF_SLOW_NOT_ALLOWED();
+
for (int log2fpp = -2; log2fpp >= -30; --log2fpp) {
const double fpp = pow(2, log2fpp);
for (int given_log_space = 8; given_log_space < 30; ++given_log_space) {
@@ -284,6 +288,8 @@ TEST_F(BlockBloomFilterTest, MinSpaceEdgeCase) {
// Check that MinLogSpace() and FalsePositiveProb() are dual
TEST_F(BlockBloomFilterTest, MinSpaceForFpp) {
+ SKIP_IF_SLOW_NOT_ALLOWED();
+
for (size_t ndv = 10000; ndv < 100 * 1000 * 1000; ndv *= 1.1) {
for (double fpp = 0.1; fpp > pow(2, -20); fpp *= 0.9) { // NOLINT: loop on
double
// When contructing a Bloom filter, we can request a particular fpp by
calling