Skip to content

Commit 72d2c0e

Browse files
committed
test compile
1 parent 40fc178 commit 72d2c0e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/highlight/SemanticTextHighlighterTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import org.apache.lucene.util.BytesRef;
2222
import org.elasticsearch.action.OriginalIndices;
2323
import org.elasticsearch.action.search.SearchRequest;
24+
import org.elasticsearch.common.breaker.CircuitBreaker;
25+
import org.elasticsearch.common.breaker.NoopCircuitBreaker;
2426
import org.elasticsearch.common.bytes.BytesArray;
2527
import org.elasticsearch.common.bytes.BytesReference;
2628
import org.elasticsearch.common.io.Streams;
@@ -240,7 +242,7 @@ private void assertHighlightOneDoc(
240242
Mockito.when(fetchContext.getSearchExecutionContext()).thenReturn(execContext);
241243

242244
FetchSubPhase.HitContext hitContext = new FetchSubPhase.HitContext(
243-
new SearchHit(docID),
245+
new SearchHit(docID, new NoopCircuitBreaker(CircuitBreaker.REQUEST)),
244246
getOnlyLeafReader(reader).getContext(),
245247
docID,
246248
Map.of(),

x-pack/plugin/transform/src/test/java/org/elasticsearch/xpack/transform/transforms/TransformIndexerTests.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.elasticsearch.client.internal.Client;
2222
import org.elasticsearch.common.breaker.CircuitBreaker;
2323
import org.elasticsearch.common.breaker.CircuitBreakingException;
24+
import org.elasticsearch.common.breaker.NoopCircuitBreaker;
2425
import org.elasticsearch.common.settings.Settings;
2526
import org.elasticsearch.core.TimeValue;
2627
import org.elasticsearch.index.reindex.BulkByScrollResponse;
@@ -82,7 +83,11 @@
8283
public class TransformIndexerTests extends ESTestCase {
8384

8485
private static final SearchResponse ONE_HIT_SEARCH_RESPONSE = new SearchResponse(
85-
new SearchHits(new SearchHit[] { new SearchHit(1) }, new TotalHits(1L, TotalHits.Relation.EQUAL_TO), 1.0f),
86+
new SearchHits(
87+
new SearchHit[] { new SearchHit(1, new NoopCircuitBreaker(CircuitBreaker.REQUEST)) },
88+
new TotalHits(1L, TotalHits.Relation.EQUAL_TO),
89+
1.0f
90+
),
8691
// Simulate completely null aggs
8792
null,
8893
new Suggest(Collections.emptyList()),

0 commit comments

Comments
 (0)