Skip to content

Commit

Permalink
[test] Fix flaky BloomFilterPredicate test
Browse files Browse the repository at this point in the history
min, max values need to be computed across all the values
inserted in the column and not across subset of inclusive values.

Tests:
- Reproduced failure with dist-test.
- With the fix, ran the BloomFilterPredicate test 1000 times on dist_test,
no failures reported.

Change-Id: I9a8fe34b59178f513224166d7ece7374ea2d1272
Reviewed-on: http://gerrit.cloudera.org:8080/15257
Reviewed-by: Adar Dembo <[email protected]>
Tested-by: Kudu Jenkins
Reviewed-by: Grant Henke <[email protected]>
  • Loading branch information
bbhavsar authored and granthenke committed Feb 20, 2020
1 parent ef5ed59 commit df7b2a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kudu/client/predicate-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1290,9 +1290,9 @@ TEST_F(BloomFilterPredicateTest, TestBloomFilterPredicate) {

const unordered_set<int32_t> empty_set;
auto all_values = CreateRandomUniqueIntegers<int32_t>(kNumAllValues, empty_set, &rand);
auto min_max_pair = std::minmax_element(all_values.begin(), all_values.end());
vector<int32_t> inclusive_values;
ReservoirSample(all_values, kNumInclusiveValues, empty_set, &rand, &inclusive_values);
auto min_max_pair = std::minmax_element(inclusive_values.begin(), inclusive_values.end());
auto* inclusive_bf = CreateBloomFilterWithValues(inclusive_values);
auto exclusive_values = CreateRandomUniqueIntegers<int32_t>(kNumExclusiveValues, all_values,
&rand);
Expand Down

0 comments on commit df7b2a6

Please sign in to comment.