Skip to content

Commit 254d1ba

Browse files
Fix DataTiersUsageTransportActionTests testCalculateMAD (#64596) (#64629)
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]> Co-authored-by: Elastic Machine <[email protected]>
1 parent 7461c79 commit 254d1ba

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

+1-1
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)