Skip to content

Commit

Permalink
[Transform] Use unpooled SearchHits in tests (#108508)
Browse files Browse the repository at this point in the history
  • Loading branch information
prwhelan committed May 10, 2024
1 parent 7e38ee1 commit b6874a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -992,7 +992,7 @@ private MockedTransformIndexer createMockIndexer(

private static Function<SearchRequest, SearchResponse> returnHit() {
return request -> new SearchResponse(
new SearchHits(new SearchHit[] { new SearchHit(1) }, new TotalHits(1L, TotalHits.Relation.EQUAL_TO), 1.0f),
SearchHits.unpooled(new SearchHit[] { SearchHit.unpooled(1) }, new TotalHits(1L, TotalHits.Relation.EQUAL_TO), 1.0f),
// Simulate completely null aggs
null,
new Suggest(Collections.emptyList()),
Expand Down
Expand Up @@ -88,7 +88,7 @@
public class TransformIndexerStateTests extends ESTestCase {

private static final SearchResponse ONE_HIT_SEARCH_RESPONSE = new SearchResponse(
new SearchHits(new SearchHit[] { new SearchHit(1) }, new TotalHits(1L, TotalHits.Relation.EQUAL_TO), 1.0f),
SearchHits.unpooled(new SearchHit[] { SearchHit.unpooled(1) }, new TotalHits(1L, TotalHits.Relation.EQUAL_TO), 1.0f),
// Simulate completely null aggs
null,
new Suggest(Collections.emptyList()),
Expand Down

0 comments on commit b6874a5

Please sign in to comment.