Skip to content

Commit a3d9408

Browse files
authored
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 940e0f1) Signed-off-by: Andrei Dan <[email protected]>
1 parent 3d8e17f commit a3d9408

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/DataTiersFeatureSetTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class DataTiersFeatureSetTests extends ESTestCase {
2929
public void testCalculateMAD() {
3030
assertThat(DataTiersFeatureSet.computeMedianAbsoluteDeviation(new TDigestState(10)), equalTo(0L));
3131

32-
TDigestState sketch = new TDigestState(randomDoubleBetween(0, 1000, false));
32+
TDigestState sketch = new TDigestState(randomDoubleBetween(1, 1000, false));
3333
sketch.add(1);
3434
sketch.add(1);
3535
sketch.add(2);

0 commit comments

Comments
 (0)