Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Oct 24, 2023
1 parent 1b42edf commit b2e551a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
import org.elasticsearch.index.IndexingPressure;
import org.elasticsearch.index.VersionType;
import org.elasticsearch.indices.EmptySystemIndices;
import org.elasticsearch.ingest.FieldInferenceBulkRequestPreprocessor;
import org.elasticsearch.ingest.IngestService;
import org.elasticsearch.tasks.Task;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.MockUtils;
Expand All @@ -43,6 +45,7 @@
import java.util.function.Consumer;
import java.util.function.Function;

import static java.util.Collections.emptyList;
import static java.util.Collections.emptySet;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
Expand Down Expand Up @@ -125,8 +128,8 @@ public boolean hasIndexAbstraction(String indexAbstraction, ClusterState state)
threadPool,
transportService,
clusterService,
null,
null,
mock(IngestService.class),
mock(FieldInferenceBulkRequestPreprocessor.class),
null,
mock(ActionFilters.class),
indexNameExpressionResolver,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
import org.elasticsearch.indices.EmptySystemIndices;
import org.elasticsearch.indices.SystemIndexDescriptorUtils;
import org.elasticsearch.indices.SystemIndices;
import org.elasticsearch.ingest.FieldInferenceBulkRequestPreprocessor;
import org.elasticsearch.ingest.IngestService;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.VersionUtils;
import org.elasticsearch.test.index.IndexVersionUtils;
Expand All @@ -60,6 +62,7 @@
import static org.elasticsearch.test.ClusterServiceUtils.createClusterService;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.mockito.Mockito.mock;

public class TransportBulkActionTests extends ESTestCase {

Expand All @@ -81,8 +84,8 @@ class TestTransportBulkAction extends TransportBulkAction {
TransportBulkActionTests.this.threadPool,
transportService,
clusterService,
null,
null,
mock(IngestService.class),
mock(FieldInferenceBulkRequestPreprocessor.class),
null,
new ActionFilters(Collections.emptySet()),
new Resolver(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import org.elasticsearch.index.IndexVersion;
import org.elasticsearch.index.IndexingPressure;
import org.elasticsearch.indices.EmptySystemIndices;
import org.elasticsearch.ingest.FieldInferenceBulkRequestPreprocessor;
import org.elasticsearch.ingest.IngestService;
import org.elasticsearch.tasks.Task;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.VersionUtils;
Expand All @@ -58,6 +60,7 @@
import static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.mockito.Mockito.mock;

public class TransportBulkActionTookTests extends ESTestCase {

Expand Down Expand Up @@ -246,8 +249,8 @@ static class TestTransportBulkAction extends TransportBulkAction {
threadPool,
transportService,
clusterService,
null,
null,
mock(IngestService.class),
mock(FieldInferenceBulkRequestPreprocessor.class),
client,
actionFilters,
indexNameExpressionResolver,
Expand Down

0 comments on commit b2e551a

Please sign in to comment.