Skip to content

Commit c50fd8f

Browse files
committed
Drop flaky assertion
Drops an assertion that we can't be sure will always pass. If we're unlucky all documents with `_doc_count` can end up on a single shard and our assertion won't pass. In yaml we don't have the ability to assert that *either* shard has `_doc_count`. It's ok! We have an assertion for this in another place too. Close #71088
1 parent ee2818b commit c50fd8f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.aggregation/370_doc_count_field.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,7 @@ setup:
178178
- match: { aggregations.f.buckets.foo.doc_count: 8 }
179179
- match: { aggregations.f.buckets.xyz.doc_count: 5 }
180180
- match: { profile.shards.0.aggregations.0.type: FiltersAggregator.FilterByFilter }
181-
- gte: { profile.shards.0.aggregations.0.debug.segments_with_doc_count_field: 1 }
181+
# We can't assert that segments_with_doc_count_field is > 0 because we might
182+
# end up with two shards and all of the documents with the _doc_count field
183+
# may be on one field. We have a test for this in AggregationProfilerIT
184+
# and here we'd prefer to have two shards to make sure that works.

0 commit comments

Comments
 (0)