From 83be47b42c85548c17305e1501f37f26f2f842cf Mon Sep 17 00:00:00 2001 From: dblock Date: Wed, 22 Jun 2022 15:28:32 +0000 Subject: [PATCH] Select a 2.x vs. a 3.x node with predictable results. Signed-off-by: dblock --- .../180_percentiles_tdigest_metric.yml | 104 ++++++++++++++++-- 1 file changed, 95 insertions(+), 9 deletions(-) diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/180_percentiles_tdigest_metric.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/180_percentiles_tdigest_metric.yml index a523614de4f3d..53d0ed1b2d05f 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/180_percentiles_tdigest_metric.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/180_percentiles_tdigest_metric.yml @@ -44,9 +44,57 @@ setup: string_field: foo --- -"Basic test": +"Basic 2.x test": + + - skip: + version: "3.0.0 -" + features: node_selector + reason: "t-digest 3.2 was interpolating leading to incorrect percentiles" - do: + node_selector: + version: "- 2.9.99" + search: + rest_total_hits_as_int: true + body: + aggs: + percentiles_int: + percentiles: + field: int_field + percentiles_double: + percentiles: + field: double_field + + - match: { hits.total: 4 } + - length: { hits.hits: 4 } + + - match: { aggregations.percentiles_int.values.1\.0: 1.0 } + - match: { aggregations.percentiles_int.values.5\.0: 1.0 } + - match: { aggregations.percentiles_int.values.25\.0: 26.0 } + - match: { aggregations.percentiles_int.values.50\.0: 76.0 } + - match: { aggregations.percentiles_int.values.75\.0: 126.0 } + - match: { aggregations.percentiles_int.values.95\.0: 151.0 } + - match: { aggregations.percentiles_int.values.99\.0: 151.0 } + + - match: { aggregations.percentiles_double.values.1\.0: 1.0 } + - match: { aggregations.percentiles_double.values.5\.0: 1.0 } + - match: { aggregations.percentiles_double.values.25\.0: 26.0 } + - match: { aggregations.percentiles_double.values.50\.0: 76.0 } + - match: { aggregations.percentiles_double.values.75\.0: 126.0 } + - match: { aggregations.percentiles_double.values.95\.0: 151.0 } + - match: { aggregations.percentiles_double.values.99\.0: 151.0 } + +--- +"Basic 3.x test": + + - skip: + version: "- 2.9.99" + features: node_selector + reason: "t-digest 3.2 was interpolating leading to incorrect percentiles" + + - do: + node_selector: + version: "3.0.0 -" search: rest_total_hits_as_int: true body: @@ -80,7 +128,14 @@ setup: --- "Compression test": + - skip: + version: "- 2.9.99" + features: node_selector + reason: "t-digest 3.2 was interpolating leading to incorrect percentiles" + - do: + node_selector: + version: "3.0.0 -" search: rest_total_hits_as_int: true body: @@ -96,7 +151,6 @@ setup: tdigest: compression: 200 - - match: { hits.total: 4 } - length: { hits.hits: 4 } @@ -116,11 +170,17 @@ setup: - match: { aggregations.percentiles_double.values.95\.0: 151.0 } - match: { aggregations.percentiles_double.values.99\.0: 151.0 } - --- "Only aggs test": + - skip: + version: "- 2.9.99" + features: node_selector + reason: "t-digest 3.2 was interpolating leading to incorrect percentiles" + - do: + node_selector: + version: "3.0.0 -" search: rest_total_hits_as_int: true body: @@ -152,12 +212,17 @@ setup: - match: { aggregations.percentiles_double.values.95\.0: 151.0 } - match: { aggregations.percentiles_double.values.99\.0: 151.0 } - - --- "Filtered test": + - skip: + version: "- 2.9.99" + features: node_selector + reason: "t-digest 3.2 was interpolating leading to incorrect percentiles" + - do: + node_selector: + version: "3.0.0 -" search: rest_total_hits_as_int: true body: @@ -180,17 +245,17 @@ setup: - match: { aggregations.percentiles_int.values.1\.0: 51.0 } - match: { aggregations.percentiles_int.values.5\.0: 51.0 } - - match: { aggregations.percentiles_int.values.25\.0: 63.5 } + - match: { aggregations.percentiles_int.values.25\.0: 51.0 } - match: { aggregations.percentiles_int.values.50\.0: 101.0 } - - match: { aggregations.percentiles_int.values.75\.0: 138.5 } + - match: { aggregations.percentiles_int.values.75\.0: 151.0 } - match: { aggregations.percentiles_int.values.95\.0: 151.0 } - match: { aggregations.percentiles_int.values.99\.0: 151.0 } - match: { aggregations.percentiles_double.values.1\.0: 51.0 } - match: { aggregations.percentiles_double.values.5\.0: 51.0 } - - match: { aggregations.percentiles_double.values.25\.0: 63.5 } + - match: { aggregations.percentiles_double.values.25\.0: 51.0 } - match: { aggregations.percentiles_double.values.50\.0: 101.0 } - - match: { aggregations.percentiles_double.values.75\.0: 138.5 } + - match: { aggregations.percentiles_double.values.75\.0: 151.0 } - match: { aggregations.percentiles_double.values.95\.0: 151.0 } - match: { aggregations.percentiles_double.values.99\.0: 151.0 } @@ -237,7 +302,14 @@ setup: --- "Metadata test": + - skip: + version: "- 2.9.99" + features: node_selector + reason: "t-digest 3.2 was interpolating leading to incorrect percentiles" + - do: + node_selector: + version: "3.0.0 -" search: rest_total_hits_as_int: true body: @@ -322,7 +394,14 @@ setup: --- "Explicit Percents test": + - skip: + version: "- 2.9.99" + features: node_selector + reason: "t-digest 3.2 was interpolating leading to incorrect percentiles" + - do: + node_selector: + version: "3.0.0 -" search: rest_total_hits_as_int: true body: @@ -351,7 +430,14 @@ setup: --- "Non-keyed test": + - skip: + version: "- 2.9.99" + features: node_selector + reason: "t-digest 3.2 was interpolating leading to incorrect percentiles" + - do: + node_selector: + version: "3.0.0 -" search: rest_total_hits_as_int: true body: