From 57410058124da8b3ed0ce402b3324105fbcd3523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= Date: Mon, 29 May 2017 15:45:51 +0200 Subject: [PATCH] [Tests] Harden InternalExtendedStatsTests (#24934) The order in which double values are added in Java can give different results, so in testing the sum and sumOfSquares we need to allow some delta for testing equality. The difference can be larger for large sum values, so we should account for this by making the delta in the assertion depend on the values magnitude. Closes #24931 --- .../aggregations/metrics/InternalExtendedStatsTests.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/InternalExtendedStatsTests.java b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/InternalExtendedStatsTests.java index a6ccce6fbea..2ea386ebb2d 100644 --- a/core/src/test/java/org/elasticsearch/search/aggregations/metrics/InternalExtendedStatsTests.java +++ b/core/src/test/java/org/elasticsearch/search/aggregations/metrics/InternalExtendedStatsTests.java @@ -79,10 +79,13 @@ public class InternalExtendedStatsTests extends InternalAggregationTestCase