Skip to content

Commit

Permalink
Migrate tests from MaxIT to MaxAggregatorTests (elastic#45030)
Browse files Browse the repository at this point in the history
This PR migrates tests from MaxIT integration test to MaxAggregatorTests, as described in elastic#42893
  • Loading branch information
csoulios committed Aug 20, 2019
1 parent b37ebd1 commit 49cb460
Show file tree
Hide file tree
Showing 3 changed files with 661 additions and 449 deletions.
Expand Up @@ -480,7 +480,8 @@ public void testMultiValuedFieldWithValueScriptWithParams() throws IOException {
Document document = new Document();
document.add(new SortedNumericDocValuesField("values", i + 2));
document.add(new SortedNumericDocValuesField("values", i + 3));
iw.addDocument(document); }
iw.addDocument(document);
}
}, avg -> {
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);
assertTrue(AggregationInspectionHelper.hasValue(avg));
Expand All @@ -501,7 +502,8 @@ public void testMultiValuedFieldWithValueScript() throws IOException {
Document document = new Document();
document.add(new SortedNumericDocValuesField("values", i + 2));
document.add(new SortedNumericDocValuesField("values", i + 3));
iw.addDocument(document); }
iw.addDocument(document);
}
}, avg -> {
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);
assertTrue(AggregationInspectionHelper.hasValue(avg));
Expand Down

0 comments on commit 49cb460

Please sign in to comment.