Skip to content

Commit

Permalink
Update test to match new behavior of HdrHistogram
Browse files Browse the repository at this point in the history
There was a [change in behavior in HdrHistogram][1] that causes the
tests to fail with the new version. The fix here is to add another value
in the test data set for the failing test, which has the result of
making both versions of HdrHistogram agree on the percentile values.

[1]: HdrHistogram/HdrHistogram@5c7226c

Signed-off-by: Andrew Ross <andrross@amazon.com>
  • Loading branch information
andrross committed May 4, 2022
1 parent 9c7af33 commit 1948e5b
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,16 @@ setup:
---
"Filtered test":

- do:
bulk:
refresh: true
body:
- index:
_index: test_1
_id: 5
- int_field: 126
double_field: 126.0
string_field: foo
- do:
search:
rest_total_hits_as_int: true
Expand All @@ -180,22 +190,22 @@ setup:
field: double_field
hdr: {}

- match: { hits.total: 3 }
- length: { hits.hits: 3 }
- match: { hits.total: 4 }
- length: { hits.hits: 4 }

- match: { aggregations.percentiles_int.values.1\.0: 51.0 }
- match: { aggregations.percentiles_int.values.5\.0: 51.0 }
- match: { aggregations.percentiles_int.values.25\.0: 51.0 }
- match: { aggregations.percentiles_int.values.50\.0: 101.03125 }
- match: { aggregations.percentiles_int.values.75\.0: 101.03125 }
- match: { aggregations.percentiles_int.values.75\.0: 126.03125 }
- match: { aggregations.percentiles_int.values.95\.0: 151.09375 }
- match: { aggregations.percentiles_int.values.99\.0: 151.09375 }

- match: { aggregations.percentiles_double.values.1\.0: 51.0 }
- match: { aggregations.percentiles_double.values.5\.0: 51.0 }
- match: { aggregations.percentiles_double.values.25\.0: 51.0 }
- match: { aggregations.percentiles_double.values.50\.0: 101.03125 }
- match: { aggregations.percentiles_double.values.75\.0: 101.03125 }
- match: { aggregations.percentiles_double.values.75\.0: 126.03125 }
- match: { aggregations.percentiles_double.values.95\.0: 151.09375 }
- match: { aggregations.percentiles_double.values.99\.0: 151.09375 }

Expand Down

0 comments on commit 1948e5b

Please sign in to comment.