Skip to content

Commit 33a0149

Browse files
authored
Fix flaky histogram aggregation (#4111)
This commit updates the histogram aggregation usage test to only return buckets with a min_doc_count of 1. Closes #4104
1 parent e40ab14 commit 33a0149

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Tests/Tests/Aggregations/Bucket/Histogram/HistogramAggregationUsageTests.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public HistogramAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) :
2121
{
2222
field = "numberOfCommits",
2323
interval = 100.0,
24-
missing = 0.0,
24+
min_doc_count = 1,
2525
order = new
2626
{
2727
_key = "desc"
@@ -35,7 +35,7 @@ public HistogramAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) :
3535
.Histogram("commits", h => h
3636
.Field(p => p.NumberOfCommits)
3737
.Interval(100)
38-
.Missing(0)
38+
.MinimumDocumentCount(1)
3939
.Order(HistogramOrder.KeyDescending)
4040
.Offset(1.1)
4141
);
@@ -45,7 +45,7 @@ public HistogramAggregationUsageTests(ReadOnlyCluster i, EndpointUsage usage) :
4545
{
4646
Field = Field<Project>(p => p.NumberOfCommits),
4747
Interval = 100,
48-
Missing = 0,
48+
MinimumDocumentCount = 1,
4949
Order = HistogramOrder.KeyDescending,
5050
Offset = 1.1
5151
};

0 commit comments

Comments
 (0)