Skip to content

Commit 83be47b

Browse files
committed
Select a 2.x vs. a 3.x node with predictable results.
Signed-off-by: dblock <[email protected]>
1 parent 78e4c08 commit 83be47b

File tree

1 file changed

+95
-9
lines changed

1 file changed

+95
-9
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/180_percentiles_tdigest_metric.yml

Lines changed: 95 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,57 @@ setup:
4444
string_field: foo
4545

4646
---
47-
"Basic test":
47+
"Basic 2.x test":
48+
49+
- skip:
50+
version: "3.0.0 -"
51+
features: node_selector
52+
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"
4853

4954
- do:
55+
node_selector:
56+
version: "- 2.9.99"
57+
search:
58+
rest_total_hits_as_int: true
59+
body:
60+
aggs:
61+
percentiles_int:
62+
percentiles:
63+
field: int_field
64+
percentiles_double:
65+
percentiles:
66+
field: double_field
67+
68+
- match: { hits.total: 4 }
69+
- length: { hits.hits: 4 }
70+
71+
- match: { aggregations.percentiles_int.values.1\.0: 1.0 }
72+
- match: { aggregations.percentiles_int.values.5\.0: 1.0 }
73+
- match: { aggregations.percentiles_int.values.25\.0: 26.0 }
74+
- match: { aggregations.percentiles_int.values.50\.0: 76.0 }
75+
- match: { aggregations.percentiles_int.values.75\.0: 126.0 }
76+
- match: { aggregations.percentiles_int.values.95\.0: 151.0 }
77+
- match: { aggregations.percentiles_int.values.99\.0: 151.0 }
78+
79+
- match: { aggregations.percentiles_double.values.1\.0: 1.0 }
80+
- match: { aggregations.percentiles_double.values.5\.0: 1.0 }
81+
- match: { aggregations.percentiles_double.values.25\.0: 26.0 }
82+
- match: { aggregations.percentiles_double.values.50\.0: 76.0 }
83+
- match: { aggregations.percentiles_double.values.75\.0: 126.0 }
84+
- match: { aggregations.percentiles_double.values.95\.0: 151.0 }
85+
- match: { aggregations.percentiles_double.values.99\.0: 151.0 }
86+
87+
---
88+
"Basic 3.x test":
89+
90+
- skip:
91+
version: "- 2.9.99"
92+
features: node_selector
93+
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"
94+
95+
- do:
96+
node_selector:
97+
version: "3.0.0 -"
5098
search:
5199
rest_total_hits_as_int: true
52100
body:
@@ -80,7 +128,14 @@ setup:
80128
---
81129
"Compression test":
82130

131+
- skip:
132+
version: "- 2.9.99"
133+
features: node_selector
134+
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"
135+
83136
- do:
137+
node_selector:
138+
version: "3.0.0 -"
84139
search:
85140
rest_total_hits_as_int: true
86141
body:
@@ -96,7 +151,6 @@ setup:
96151
tdigest:
97152
compression: 200
98153

99-
100154
- match: { hits.total: 4 }
101155
- length: { hits.hits: 4 }
102156

@@ -116,11 +170,17 @@ setup:
116170
- match: { aggregations.percentiles_double.values.95\.0: 151.0 }
117171
- match: { aggregations.percentiles_double.values.99\.0: 151.0 }
118172

119-
120173
---
121174
"Only aggs test":
122175

176+
- skip:
177+
version: "- 2.9.99"
178+
features: node_selector
179+
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"
180+
123181
- do:
182+
node_selector:
183+
version: "3.0.0 -"
124184
search:
125185
rest_total_hits_as_int: true
126186
body:
@@ -152,12 +212,17 @@ setup:
152212
- match: { aggregations.percentiles_double.values.95\.0: 151.0 }
153213
- match: { aggregations.percentiles_double.values.99\.0: 151.0 }
154214

155-
156-
157215
---
158216
"Filtered test":
159217

218+
- skip:
219+
version: "- 2.9.99"
220+
features: node_selector
221+
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"
222+
160223
- do:
224+
node_selector:
225+
version: "3.0.0 -"
161226
search:
162227
rest_total_hits_as_int: true
163228
body:
@@ -180,17 +245,17 @@ setup:
180245

181246
- match: { aggregations.percentiles_int.values.1\.0: 51.0 }
182247
- match: { aggregations.percentiles_int.values.5\.0: 51.0 }
183-
- match: { aggregations.percentiles_int.values.25\.0: 63.5 }
248+
- match: { aggregations.percentiles_int.values.25\.0: 51.0 }
184249
- match: { aggregations.percentiles_int.values.50\.0: 101.0 }
185-
- match: { aggregations.percentiles_int.values.75\.0: 138.5 }
250+
- match: { aggregations.percentiles_int.values.75\.0: 151.0 }
186251
- match: { aggregations.percentiles_int.values.95\.0: 151.0 }
187252
- match: { aggregations.percentiles_int.values.99\.0: 151.0 }
188253

189254
- match: { aggregations.percentiles_double.values.1\.0: 51.0 }
190255
- match: { aggregations.percentiles_double.values.5\.0: 51.0 }
191-
- match: { aggregations.percentiles_double.values.25\.0: 63.5 }
256+
- match: { aggregations.percentiles_double.values.25\.0: 51.0 }
192257
- match: { aggregations.percentiles_double.values.50\.0: 101.0 }
193-
- match: { aggregations.percentiles_double.values.75\.0: 138.5 }
258+
- match: { aggregations.percentiles_double.values.75\.0: 151.0 }
194259
- match: { aggregations.percentiles_double.values.95\.0: 151.0 }
195260
- match: { aggregations.percentiles_double.values.99\.0: 151.0 }
196261

@@ -237,7 +302,14 @@ setup:
237302
---
238303
"Metadata test":
239304

305+
- skip:
306+
version: "- 2.9.99"
307+
features: node_selector
308+
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"
309+
240310
- do:
311+
node_selector:
312+
version: "3.0.0 -"
241313
search:
242314
rest_total_hits_as_int: true
243315
body:
@@ -322,7 +394,14 @@ setup:
322394
---
323395
"Explicit Percents test":
324396

397+
- skip:
398+
version: "- 2.9.99"
399+
features: node_selector
400+
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"
401+
325402
- do:
403+
node_selector:
404+
version: "3.0.0 -"
326405
search:
327406
rest_total_hits_as_int: true
328407
body:
@@ -351,7 +430,14 @@ setup:
351430
---
352431
"Non-keyed test":
353432

433+
- skip:
434+
version: "- 2.9.99"
435+
features: node_selector
436+
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"
437+
354438
- do:
439+
node_selector:
440+
version: "3.0.0 -"
355441
search:
356442
rest_total_hits_as_int: true
357443
body:

0 commit comments

Comments
 (0)