Fix DataTiersUsageTransportActionTests testCalculateMAD (#64596) (#64628)

Random the compression factor starting with 1 (to elimitinate nearly 0 values)
which will only use one centroid (and yield 0 for MAD as the aproximate median
is the same as the single centroid mean value)

(cherry picked from commit 940e0f1fde0f40f99af117dd03ab0891c9eedae6)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
This commit is contained in:
Andrei Dan 2020-11-05 10:58:40 +00:00 committed by GitHub
parent 3d8e17f3bd
commit a3d9408fda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ public class DataTiersFeatureSetTests extends ESTestCase {
public void testCalculateMAD() {
assertThat(DataTiersFeatureSet.computeMedianAbsoluteDeviation(new TDigestState(10)), equalTo(0L));
TDigestState sketch = new TDigestState(randomDoubleBetween(0, 1000, false));
TDigestState sketch = new TDigestState(randomDoubleBetween(1, 1000, false));
sketch.add(1);
sketch.add(1);
sketch.add(2);