Skip to content

Commit c108b7d

Browse files
PeteGillinElasticomricohenn
authored andcommitted
Tweak tolerance in EWMR tests (elastic#125773)
We have seen occasional failures with the existing tolerance, in `testEwmr_threadSafe` which contains some randomness. We were asserting the result of a lot of f.p. operations with a tolerance of 1.0e-13. The highest error I saw in any of the reported failures was less than 1.2e-13. This PR increases the tolerance to 2.0e-13 which should allow all those to pass. Fixes elastic#124692
1 parent 945de6f commit c108b7d

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,6 @@ tests:
311311
- class: org.elasticsearch.multiproject.test.CoreWithMultipleProjectsClientYamlTestSuiteIT
312312
method: test {yaml=search.vectors/41_knn_search_byte_quantized/kNN search plus query}
313313
issue: https://github.com/elastic/elasticsearch/issues/124687
314-
- class: org.elasticsearch.common.metrics.ExponentiallyWeightedMovingRateTests
315-
method: testEwmr_threadSafe
316-
issue: https://github.com/elastic/elasticsearch/issues/124692
317314
- class: org.elasticsearch.packaging.test.BootstrapCheckTests
318315
method: test20RunWithBootstrapChecks
319316
issue: https://github.com/elastic/elasticsearch/issues/124940

server/src/test/java/org/elasticsearch/common/metrics/ExponentiallyWeightedMovingRateTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
public class ExponentiallyWeightedMovingRateTests extends ESTestCase {
2525

26-
private static final double TOLERANCE = 1.0e-13;
26+
private static final double TOLERANCE = 2.0e-13;
2727
private static final double HALF_LIFE_MILLIS = 1.0e6; // Half-life of used by many tests
2828
private static final double LAMBDA = Math.log(2.0) / HALF_LIFE_MILLIS; // Equivalent value of lambda
2929
public static final int START_TIME_IN_MILLIS = 1234567;

0 commit comments

Comments
 (0)