diff options
author | Areek Zillur <areek.zillur@elasticsearch.com> | 2016-10-03 13:59:56 -0400 |
---|---|---|
committer | Areek Zillur <areek.zillur@elasticsearch.com> | 2016-10-03 16:12:11 -0400 |
commit | 248ac240ed67d29113affa92a60d33f1b7f38a70 (patch) | |
tree | 677337e784ee66f143fe465f2f1450524050c903 /core/src/test/java/org/elasticsearch/action/ingest | |
parent | 14908f8726e698640565b197c204b879ab7fc2f6 (diff) | |
parent | 80bae2178f14552b378d5e8518f4111c50d89c33 (diff) |
Merge branch 'master' into cleanup/transport_bulk
Diffstat (limited to 'core/src/test/java/org/elasticsearch/action/ingest')
9 files changed, 90 insertions, 66 deletions
diff --git a/core/src/test/java/org/elasticsearch/action/ingest/IngestActionFilterTests.java b/core/src/test/java/org/elasticsearch/action/ingest/IngestActionFilterTests.java index 331a956e8a..2b9f9c5532 100644 --- a/core/src/test/java/org/elasticsearch/action/ingest/IngestActionFilterTests.java +++ b/core/src/test/java/org/elasticsearch/action/ingest/IngestActionFilterTests.java @@ -162,7 +162,7 @@ public class IngestActionFilterTests extends ESTestCase { PipelineStore store = mock(PipelineStore.class); Processor processor = new TestProcessor(ingestDocument -> ingestDocument.setFieldValue("field2", "value2")); - when(store.get("_id")).thenReturn(new Pipeline("_id", "_description", new CompoundProcessor(processor))); + when(store.get("_id")).thenReturn(new Pipeline("_id", "_description", randomInt(), new CompoundProcessor(processor))); executionService = new PipelineExecutionService(store, threadPool); IngestService ingestService = mock(IngestService.class); when(ingestService.getPipelineExecutionService()).thenReturn(executionService); diff --git a/core/src/test/java/org/elasticsearch/action/ingest/IngestProxyActionFilterTests.java b/core/src/test/java/org/elasticsearch/action/ingest/IngestProxyActionFilterTests.java index a602465197..50bd3771bc 100644 --- a/core/src/test/java/org/elasticsearch/action/ingest/IngestProxyActionFilterTests.java +++ b/core/src/test/java/org/elasticsearch/action/ingest/IngestProxyActionFilterTests.java @@ -33,29 +33,30 @@ import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.node.DiscoveryNodes; import org.elasticsearch.cluster.service.ClusterService; +import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.LocalTransportAddress; import org.elasticsearch.tasks.Task; import org.elasticsearch.test.ESTestCase; import org.elasticsearch.test.VersionUtils; import org.elasticsearch.transport.TransportException; +import org.elasticsearch.transport.TransportInterceptor; import org.elasticsearch.transport.TransportRequest; +import org.elasticsearch.transport.TransportRequestOptions; import org.elasticsearch.transport.TransportResponse; import org.elasticsearch.transport.TransportResponseHandler; import org.elasticsearch.transport.TransportService; import org.hamcrest.CustomTypeSafeMatcher; -import org.mockito.stubbing.Answer; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; +import java.util.concurrent.atomic.AtomicBoolean; import static org.hamcrest.CoreMatchers.equalTo; import static org.mockito.Matchers.any; -import static org.mockito.Matchers.argThat; import static org.mockito.Matchers.eq; import static org.mockito.Matchers.same; -import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; @@ -67,7 +68,7 @@ public class IngestProxyActionFilterTests extends ESTestCase { private TransportService transportService; @SuppressWarnings("unchecked") - private IngestProxyActionFilter buildFilter(int ingestNodes, int totalNodes) { + private IngestProxyActionFilter buildFilter(int ingestNodes, int totalNodes, TransportInterceptor interceptor) { ClusterState.Builder clusterState = new ClusterState.Builder(new ClusterName("_name")); DiscoveryNodes.Builder builder = new DiscoveryNodes.Builder(); DiscoveryNode localNode = null; @@ -88,7 +89,7 @@ public class IngestProxyActionFilterTests extends ESTestCase { ClusterService clusterService = mock(ClusterService.class); when(clusterService.localNode()).thenReturn(localNode); when(clusterService.state()).thenReturn(clusterState.build()); - transportService = mock(TransportService.class); + transportService = new TransportService(Settings.EMPTY, null, null, interceptor); return new IngestProxyActionFilter(clusterService, transportService); } @@ -97,7 +98,7 @@ public class IngestProxyActionFilterTests extends ESTestCase { ActionListener actionListener = mock(ActionListener.class); ActionFilterChain actionFilterChain = mock(ActionFilterChain.class); int totalNodes = randomIntBetween(1, 5); - IngestProxyActionFilter filter = buildFilter(0, totalNodes); + IngestProxyActionFilter filter = buildFilter(0, totalNodes, TransportService.NOOP_TRANSPORT_INTERCEPTOR); String action; ActionRequest request; @@ -114,7 +115,6 @@ public class IngestProxyActionFilterTests extends ESTestCase { } catch(IllegalStateException e) { assertThat(e.getMessage(), equalTo("There are no ingest nodes in this cluster, unable to forward request to an ingest node.")); } - verifyZeroInteractions(transportService); verifyZeroInteractions(actionFilterChain); verifyZeroInteractions(actionListener); } @@ -124,7 +124,8 @@ public class IngestProxyActionFilterTests extends ESTestCase { ActionListener actionListener = mock(ActionListener.class); ActionFilterChain actionFilterChain = mock(ActionFilterChain.class); int totalNodes = randomIntBetween(1, 5); - IngestProxyActionFilter filter = buildFilter(randomIntBetween(0, totalNodes - 1), totalNodes); + IngestProxyActionFilter filter = buildFilter(randomIntBetween(0, totalNodes - 1), totalNodes, + TransportService.NOOP_TRANSPORT_INTERCEPTOR); String action; ActionRequest request; @@ -136,7 +137,6 @@ public class IngestProxyActionFilterTests extends ESTestCase { request = new BulkRequest().add(new IndexRequest()); } filter.apply(task, action, request, actionListener, actionFilterChain); - verifyZeroInteractions(transportService); verify(actionFilterChain).proceed(any(Task.class), eq(action), same(request), same(actionListener)); verifyZeroInteractions(actionListener); } @@ -147,11 +147,11 @@ public class IngestProxyActionFilterTests extends ESTestCase { ActionFilterChain actionFilterChain = mock(ActionFilterChain.class); ActionRequest request = mock(ActionRequest.class); int totalNodes = randomIntBetween(1, 5); - IngestProxyActionFilter filter = buildFilter(randomIntBetween(0, totalNodes - 1), totalNodes); + IngestProxyActionFilter filter = buildFilter(randomIntBetween(0, totalNodes - 1), totalNodes, + TransportService.NOOP_TRANSPORT_INTERCEPTOR); String action = randomAsciiOfLengthBetween(1, 20); filter.apply(task, action, request, actionListener, actionFilterChain); - verifyZeroInteractions(transportService); verify(actionFilterChain).proceed(any(Task.class), eq(action), same(request), same(actionListener)); verifyZeroInteractions(actionListener); } @@ -162,19 +162,31 @@ public class IngestProxyActionFilterTests extends ESTestCase { ActionListener actionListener = mock(ActionListener.class); ActionFilterChain actionFilterChain = mock(ActionFilterChain.class); int totalNodes = randomIntBetween(2, 5); - IngestProxyActionFilter filter = buildFilter(randomIntBetween(1, totalNodes - 1), totalNodes); - Answer<Void> answer = invocationOnMock -> { - TransportResponseHandler transportResponseHandler = (TransportResponseHandler) invocationOnMock.getArguments()[3]; - transportResponseHandler.handleResponse(new IndexResponse()); - return null; - }; - doAnswer(answer).when(transportService).sendRequest(any(DiscoveryNode.class), any(String.class), any(TransportRequest.class), any(TransportResponseHandler.class)); + AtomicBoolean run = new AtomicBoolean(false); + + IngestProxyActionFilter filter = buildFilter(randomIntBetween(1, totalNodes - 1), totalNodes, + new TransportInterceptor() { + @Override + public AsyncSender interceptSender(AsyncSender sender) { + return new AsyncSender() { + @Override + public <T extends TransportResponse> void sendRequest(DiscoveryNode node, String action, TransportRequest request, + TransportRequestOptions options, + TransportResponseHandler<T> handler) { + assertTrue(run.compareAndSet(false, true)); + assertTrue(node.isIngestNode()); + assertEquals(action, IndexAction.NAME); + handler.handleResponse((T) new IndexResponse()); + } + }; + } + }); IndexRequest indexRequest = new IndexRequest().setPipeline("_id"); filter.apply(task, IndexAction.NAME, indexRequest, actionListener, actionFilterChain); - verify(transportService).sendRequest(argThat(new IngestNodeMatcher()), eq(IndexAction.NAME), same(indexRequest), any(TransportResponseHandler.class)); verifyZeroInteractions(actionFilterChain); + assertTrue(run.get()); verify(actionListener).onResponse(any(IndexResponse.class)); verify(actionListener, never()).onFailure(any(TransportException.class)); } @@ -185,13 +197,24 @@ public class IngestProxyActionFilterTests extends ESTestCase { ActionListener actionListener = mock(ActionListener.class); ActionFilterChain actionFilterChain = mock(ActionFilterChain.class); int totalNodes = randomIntBetween(2, 5); - IngestProxyActionFilter filter = buildFilter(randomIntBetween(1, totalNodes - 1), totalNodes); - Answer<Void> answer = invocationOnMock -> { - TransportResponseHandler transportResponseHandler = (TransportResponseHandler) invocationOnMock.getArguments()[3]; - transportResponseHandler.handleResponse(new BulkResponse(null, -1)); - return null; - }; - doAnswer(answer).when(transportService).sendRequest(any(DiscoveryNode.class), any(String.class), any(TransportRequest.class), any(TransportResponseHandler.class)); + AtomicBoolean run = new AtomicBoolean(false); + IngestProxyActionFilter filter = buildFilter(randomIntBetween(1, totalNodes - 1), totalNodes, + new TransportInterceptor() { + @Override + public AsyncSender interceptSender(AsyncSender sender) { + return new AsyncSender() { + @Override + public <T extends TransportResponse> void sendRequest(DiscoveryNode node, String action, TransportRequest request, + TransportRequestOptions options, + TransportResponseHandler<T> handler) { + assertTrue(run.compareAndSet(false, true)); + assertTrue(node.isIngestNode()); + assertEquals(action, BulkAction.NAME); + handler.handleResponse((T) new BulkResponse(null, -1)); + } + }; + } + }); BulkRequest bulkRequest = new BulkRequest(); bulkRequest.add(new IndexRequest().setPipeline("_id")); @@ -200,11 +223,10 @@ public class IngestProxyActionFilterTests extends ESTestCase { bulkRequest.add(new IndexRequest()); } filter.apply(task, BulkAction.NAME, bulkRequest, actionListener, actionFilterChain); - - verify(transportService).sendRequest(argThat(new IngestNodeMatcher()), eq(BulkAction.NAME), same(bulkRequest), any(TransportResponseHandler.class)); verifyZeroInteractions(actionFilterChain); verify(actionListener).onResponse(any(BulkResponse.class)); verify(actionListener, never()).onFailure(any(TransportException.class)); + assertTrue(run.get()); } @SuppressWarnings("unchecked") @@ -213,30 +235,39 @@ public class IngestProxyActionFilterTests extends ESTestCase { ActionListener actionListener = mock(ActionListener.class); ActionFilterChain actionFilterChain = mock(ActionFilterChain.class); int totalNodes = randomIntBetween(2, 5); - IngestProxyActionFilter filter = buildFilter(randomIntBetween(1, totalNodes - 1), totalNodes); - Answer<Void> answer = invocationOnMock -> { - TransportResponseHandler transportResponseHandler = (TransportResponseHandler) invocationOnMock.getArguments()[3]; - transportResponseHandler.handleException(new TransportException(new IllegalArgumentException())); - return null; - }; - doAnswer(answer).when(transportService).sendRequest(any(DiscoveryNode.class), any(String.class), any(TransportRequest.class), any(TransportResponseHandler.class)); - - String action; + String requestAction; ActionRequest request; if (randomBoolean()) { - action = IndexAction.NAME; + requestAction = IndexAction.NAME; request = new IndexRequest().setPipeline("_id"); } else { - action = BulkAction.NAME; + requestAction = BulkAction.NAME; request = new BulkRequest().add(new IndexRequest().setPipeline("_id")); } - - filter.apply(task, action, request, actionListener, actionFilterChain); - - verify(transportService).sendRequest(argThat(new IngestNodeMatcher()), eq(action), same(request), any(TransportResponseHandler.class)); + AtomicBoolean run = new AtomicBoolean(false); + IngestProxyActionFilter filter = buildFilter(randomIntBetween(1, totalNodes - 1), totalNodes, + new TransportInterceptor() { + @Override + public AsyncSender interceptSender(AsyncSender sender) { + return new AsyncSender() { + @Override + public <T extends TransportResponse> void sendRequest(DiscoveryNode node, String action, TransportRequest request, + TransportRequestOptions options, + TransportResponseHandler<T> handler) { + assertTrue(run.compareAndSet(false, true)); + assertTrue(node.isIngestNode()); + assertEquals(action, requestAction); + handler.handleException(new TransportException(new IllegalArgumentException())); + } + }; + } + }); + filter.apply(task, requestAction, request, actionListener, actionFilterChain); verifyZeroInteractions(actionFilterChain); verify(actionListener).onFailure(any(TransportException.class)); verify(actionListener, never()).onResponse(any(TransportResponse.class)); + assertTrue(run.get()); + } private static class IngestNodeMatcher extends CustomTypeSafeMatcher<DiscoveryNode> { diff --git a/core/src/test/java/org/elasticsearch/action/ingest/SimulateDocumentSimpleResultTests.java b/core/src/test/java/org/elasticsearch/action/ingest/SimulateDocumentSimpleResultTests.java index 544e2932b4..83aad26f6a 100644 --- a/core/src/test/java/org/elasticsearch/action/ingest/SimulateDocumentSimpleResultTests.java +++ b/core/src/test/java/org/elasticsearch/action/ingest/SimulateDocumentSimpleResultTests.java @@ -27,7 +27,7 @@ import org.elasticsearch.test.ESTestCase; import java.io.IOException; -import static org.elasticsearch.ingest.IngestDocumentTests.assertIngestDocument; +import static org.elasticsearch.ingest.IngestDocumentMatcher.assertIngestDocument; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.instanceOf; diff --git a/core/src/test/java/org/elasticsearch/action/ingest/SimulateExecutionServiceTests.java b/core/src/test/java/org/elasticsearch/action/ingest/SimulateExecutionServiceTests.java index 8cf0550981..a4320d2641 100644 --- a/core/src/test/java/org/elasticsearch/action/ingest/SimulateExecutionServiceTests.java +++ b/core/src/test/java/org/elasticsearch/action/ingest/SimulateExecutionServiceTests.java @@ -34,7 +34,7 @@ import org.junit.Before; import java.util.Collections; import java.util.Map; -import static org.elasticsearch.ingest.IngestDocumentTests.assertIngestDocument; +import static org.elasticsearch.ingest.IngestDocumentMatcher.assertIngestDocument; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.not; @@ -43,6 +43,8 @@ import static org.hamcrest.Matchers.sameInstance; public class SimulateExecutionServiceTests extends ESTestCase { + private final Integer version = randomBoolean() ? randomInt() : null; + private ThreadPool threadPool; private SimulateExecutionService executionService; private IngestDocument ingestDocument; @@ -65,7 +67,7 @@ public class SimulateExecutionServiceTests extends ESTestCase { public void testExecuteVerboseItem() throws Exception { TestProcessor processor = new TestProcessor("test-id", "mock", ingestDocument -> {}); - Pipeline pipeline = new Pipeline("_id", "_description", new CompoundProcessor(processor, processor)); + Pipeline pipeline = new Pipeline("_id", "_description", version, new CompoundProcessor(processor, processor)); SimulateDocumentResult actualItemResponse = executionService.executeDocument(pipeline, ingestDocument, true); assertThat(processor.getInvokedCounter(), equalTo(2)); assertThat(actualItemResponse, instanceOf(SimulateDocumentVerboseResult.class)); @@ -90,7 +92,7 @@ public class SimulateExecutionServiceTests extends ESTestCase { public void testExecuteItem() throws Exception { TestProcessor processor = new TestProcessor("processor_0", "mock", ingestDocument -> {}); - Pipeline pipeline = new Pipeline("_id", "_description", new CompoundProcessor(processor, processor)); + Pipeline pipeline = new Pipeline("_id", "_description", version, new CompoundProcessor(processor, processor)); SimulateDocumentResult actualItemResponse = executionService.executeDocument(pipeline, ingestDocument, false); assertThat(processor.getInvokedCounter(), equalTo(2)); assertThat(actualItemResponse, instanceOf(SimulateDocumentBaseResult.class)); @@ -103,7 +105,7 @@ public class SimulateExecutionServiceTests extends ESTestCase { TestProcessor processor1 = new TestProcessor("processor_0", "mock", ingestDocument -> {}); TestProcessor processor2 = new TestProcessor("processor_1", "mock", ingestDocument -> { throw new RuntimeException("processor failed"); }); TestProcessor processor3 = new TestProcessor("processor_2", "mock", ingestDocument -> {}); - Pipeline pipeline = new Pipeline("_id", "_description", new CompoundProcessor(processor1, processor2, processor3)); + Pipeline pipeline = new Pipeline("_id", "_description", version, new CompoundProcessor(processor1, processor2, processor3)); SimulateDocumentResult actualItemResponse = executionService.executeDocument(pipeline, ingestDocument, true); assertThat(processor1.getInvokedCounter(), equalTo(1)); assertThat(processor2.getInvokedCounter(), equalTo(1)); @@ -127,7 +129,7 @@ public class SimulateExecutionServiceTests extends ESTestCase { TestProcessor processor1 = new TestProcessor("processor_0", "mock", ingestDocument -> { throw new RuntimeException("processor failed"); }); TestProcessor processor2 = new TestProcessor("processor_1", "mock", ingestDocument -> {}); TestProcessor processor3 = new TestProcessor("processor_2", "mock", ingestDocument -> {}); - Pipeline pipeline = new Pipeline("_id", "_description", + Pipeline pipeline = new Pipeline("_id", "_description", version, new CompoundProcessor(new CompoundProcessor(false, Collections.singletonList(processor1), Collections.singletonList(processor2)), processor3)); SimulateDocumentResult actualItemResponse = executionService.executeDocument(pipeline, ingestDocument, true); @@ -163,7 +165,7 @@ public class SimulateExecutionServiceTests extends ESTestCase { RuntimeException exception = new RuntimeException("processor failed"); TestProcessor testProcessor = new TestProcessor("processor_0", "mock", ingestDocument -> { throw exception; }); CompoundProcessor processor = new CompoundProcessor(true, Collections.singletonList(testProcessor), Collections.emptyList()); - Pipeline pipeline = new Pipeline("_id", "_description", new CompoundProcessor(processor)); + Pipeline pipeline = new Pipeline("_id", "_description", version, new CompoundProcessor(processor)); SimulateDocumentResult actualItemResponse = executionService.executeDocument(pipeline, ingestDocument, true); assertThat(testProcessor.getInvokedCounter(), equalTo(1)); assertThat(actualItemResponse, instanceOf(SimulateDocumentVerboseResult.class)); @@ -179,7 +181,7 @@ public class SimulateExecutionServiceTests extends ESTestCase { public void testExecuteVerboseItemWithoutExceptionAndWithIgnoreFailure() throws Exception { TestProcessor testProcessor = new TestProcessor("processor_0", "mock", ingestDocument -> { }); CompoundProcessor processor = new CompoundProcessor(true, Collections.singletonList(testProcessor), Collections.emptyList()); - Pipeline pipeline = new Pipeline("_id", "_description", new CompoundProcessor(processor)); + Pipeline pipeline = new Pipeline("_id", "_description", version, new CompoundProcessor(processor)); SimulateDocumentResult actualItemResponse = executionService.executeDocument(pipeline, ingestDocument, true); assertThat(testProcessor.getInvokedCounter(), equalTo(1)); assertThat(actualItemResponse, instanceOf(SimulateDocumentVerboseResult.class)); @@ -194,7 +196,7 @@ public class SimulateExecutionServiceTests extends ESTestCase { public void testExecuteItemWithFailure() throws Exception { TestProcessor processor = new TestProcessor(ingestDocument -> { throw new RuntimeException("processor failed"); }); - Pipeline pipeline = new Pipeline("_id", "_description", new CompoundProcessor(processor, processor)); + Pipeline pipeline = new Pipeline("_id", "_description", version, new CompoundProcessor(processor, processor)); SimulateDocumentResult actualItemResponse = executionService.executeDocument(pipeline, ingestDocument, false); assertThat(processor.getInvokedCounter(), equalTo(1)); assertThat(actualItemResponse, instanceOf(SimulateDocumentBaseResult.class)); diff --git a/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineRequestParsingTests.java b/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineRequestParsingTests.java index 8418c886be..ab5d30c6f9 100644 --- a/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineRequestParsingTests.java +++ b/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineRequestParsingTests.java @@ -54,7 +54,7 @@ public class SimulatePipelineRequestParsingTests extends ESTestCase { public void init() throws IOException { TestProcessor processor = new TestProcessor(ingestDocument -> {}); CompoundProcessor pipelineCompoundProcessor = new CompoundProcessor(processor); - Pipeline pipeline = new Pipeline(SIMULATED_PIPELINE_ID, null, pipelineCompoundProcessor); + Pipeline pipeline = new Pipeline(SIMULATED_PIPELINE_ID, null, null, pipelineCompoundProcessor); Map<String, Processor.Factory> registry = Collections.singletonMap("mock_processor", (factories, tag, config) -> processor); store = mock(PipelineStore.class); diff --git a/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineRequestTests.java b/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineRequestTests.java index 2c2506308a..0966010a8f 100644 --- a/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineRequestTests.java +++ b/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineRequestTests.java @@ -20,22 +20,13 @@ package org.elasticsearch.action.ingest; import org.elasticsearch.common.bytes.BytesArray; -import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.ingest.IngestDocument; -import org.elasticsearch.ingest.RandomDocumentPicks; import org.elasticsearch.test.ESTestCase; import java.io.IOException; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import static org.elasticsearch.ingest.IngestDocumentTests.assertIngestDocument; import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.hamcrest.CoreMatchers.nullValue; public class SimulatePipelineRequestTests extends ESTestCase { diff --git a/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineResponseTests.java b/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineResponseTests.java index 485dc8934c..ad308b01bf 100644 --- a/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineResponseTests.java +++ b/core/src/test/java/org/elasticsearch/action/ingest/SimulatePipelineResponseTests.java @@ -30,7 +30,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import static org.elasticsearch.ingest.IngestDocumentTests.assertIngestDocument; +import static org.elasticsearch.ingest.IngestDocumentMatcher.assertIngestDocument; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.CoreMatchers.nullValue; diff --git a/core/src/test/java/org/elasticsearch/action/ingest/SimulateProcessorResultTests.java b/core/src/test/java/org/elasticsearch/action/ingest/SimulateProcessorResultTests.java index f6ffc03534..75d2d5834f 100644 --- a/core/src/test/java/org/elasticsearch/action/ingest/SimulateProcessorResultTests.java +++ b/core/src/test/java/org/elasticsearch/action/ingest/SimulateProcessorResultTests.java @@ -27,7 +27,7 @@ import org.elasticsearch.test.ESTestCase; import java.io.IOException; -import static org.elasticsearch.ingest.IngestDocumentTests.assertIngestDocument; +import static org.elasticsearch.ingest.IngestDocumentMatcher.assertIngestDocument; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; diff --git a/core/src/test/java/org/elasticsearch/action/ingest/WriteableIngestDocumentTests.java b/core/src/test/java/org/elasticsearch/action/ingest/WriteableIngestDocumentTests.java index 5df0aa1de0..bc72094558 100644 --- a/core/src/test/java/org/elasticsearch/action/ingest/WriteableIngestDocumentTests.java +++ b/core/src/test/java/org/elasticsearch/action/ingest/WriteableIngestDocumentTests.java @@ -34,7 +34,7 @@ import java.util.HashMap; import java.util.Map; import static org.elasticsearch.common.xcontent.ToXContent.EMPTY_PARAMS; -import static org.elasticsearch.ingest.IngestDocumentTests.assertIngestDocument; +import static org.elasticsearch.ingest.IngestDocumentMatcher.assertIngestDocument; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; |