Skip to content

Commit

Permalink
Fix bunch of tests
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Kale <[email protected]>
  • Loading branch information
Sachin Kale committed Oct 17, 2023
1 parent f76e863 commit 53ef1cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,7 @@ public void testSingleValuedFieldOrderedBySingleValueSubAggregationAscAsCompound
}

private void assertMultiSortResponse(int[] expectedDays, BucketOrder... order) {
refresh("sort_idx");
refresh();
ZonedDateTime[] expectedKeys = Arrays.stream(expectedDays).mapToObj(d -> date(1, d)).toArray(ZonedDateTime[]::new);
SearchResponse response = client().prepareSearch("sort_idx")
.addAggregation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static Double scoringScript(Map<String, Object> vars, Function<ScoreAccessor, Nu
public void testConsistentHitsWithSameSeed() throws Exception {
createIndex("test");
ensureGreen(); // make sure we are done otherwise preference could change?
int docCount = randomIntBetween(100, 200);
int docCount = randomIntBetween(10, 20);
for (int i = 0; i < docCount; i++) {
index("test", "type", "" + i, jsonBuilder().startObject().field("foo", i).endObject());
}
Expand Down Expand Up @@ -178,7 +178,7 @@ public void testConsistentHitsWithSameSeed() throws Exception {
}

// randomly change some docs to get them in different segments
int numDocsToChange = randomIntBetween(20, 50);
int numDocsToChange = randomIntBetween(10, 30);
while (numDocsToChange > 0) {
int doc = randomInt(docCount - 1);// watch out this is inclusive the max values!
index("test", "type", "" + doc, jsonBuilder().startObject().field("foo", doc).endObject());
Expand Down

0 comments on commit 53ef1cd

Please sign in to comment.