Skip to content

Commit 96a40ac

Browse files
authored
[7.x] Migrate tests from MaxIT to MaxAggregatorTests (#45030) #45742
Backports PR #45030 to 7.x: This PR migrates tests from MaxIT integration test to MaxAggregatorTests, as described in #42893
1 parent a219a0f commit 96a40ac

File tree

3 files changed

+661
-449
lines changed

3 files changed

+661
-449
lines changed

server/src/test/java/org/elasticsearch/search/aggregations/metrics/AvgAggregatorTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,8 @@ public void testMultiValuedFieldWithValueScriptWithParams() throws IOException {
480480
Document document = new Document();
481481
document.add(new SortedNumericDocValuesField("values", i + 2));
482482
document.add(new SortedNumericDocValuesField("values", i + 3));
483-
iw.addDocument(document); }
483+
iw.addDocument(document);
484+
}
484485
}, avg -> {
485486
assertEquals((double) (3+4+4+5+5+6+6+7+7+8+8+9+9+10+10+11+11+12+12+13) / 20, avg.getValue(), 0);
486487
assertTrue(AggregationInspectionHelper.hasValue(avg));
@@ -501,7 +502,8 @@ public void testMultiValuedFieldWithValueScript() throws IOException {
501502
Document document = new Document();
502503
document.add(new SortedNumericDocValuesField("values", i + 2));
503504
document.add(new SortedNumericDocValuesField("values", i + 3));
504-
iw.addDocument(document); }
505+
iw.addDocument(document);
506+
}
505507
}, avg -> {
506508
assertEquals((double) (2+3+3+4+4+5+5+6+6+7+7+8+8+9+9+10+10+11+11+12) / 20, avg.getValue(), 0);
507509
assertTrue(AggregationInspectionHelper.hasValue(avg));

0 commit comments

Comments
 (0)