fixed compile errors after cherry-picking
This commit is contained in:
parent
237f2bd60a
commit
8f3387e7cb
|
@ -65,7 +65,7 @@ class SimulateExecutionService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void execute(SimulatePipelineRequest.Parsed request, ActionListener<SimulatePipelineResponse> listener) {
|
public void execute(SimulatePipelineRequest.Parsed request, ActionListener<SimulatePipelineResponse> listener) {
|
||||||
threadPool.executor(THREAD_POOL_NAME).execute(new ActionRunnable<>(listener) {
|
threadPool.executor(THREAD_POOL_NAME).execute(new ActionRunnable<SimulatePipelineResponse>(listener) {
|
||||||
@Override
|
@Override
|
||||||
protected void doRun() {
|
protected void doRun() {
|
||||||
final AtomicInteger counter = new AtomicInteger();
|
final AtomicInteger counter = new AtomicInteger();
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class BulkRequestModifierTests extends ESTestCase {
|
||||||
assertThat(bulkRequest.requests().size(), Matchers.equalTo(16));
|
assertThat(bulkRequest.requests().size(), Matchers.equalTo(16));
|
||||||
|
|
||||||
List<BulkItemResponse> responses = new ArrayList<>();
|
List<BulkItemResponse> responses = new ArrayList<>();
|
||||||
ActionListener<BulkResponse> bulkResponseListener = modifier.wrapActionListenerIfNeeded(1L, new ActionListener<>() {
|
ActionListener<BulkResponse> bulkResponseListener = modifier.wrapActionListenerIfNeeded(1L, new ActionListener<BulkResponse>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(BulkResponse bulkItemResponses) {
|
public void onResponse(BulkResponse bulkItemResponses) {
|
||||||
responses.addAll(Arrays.asList(bulkItemResponses.getItems()));
|
responses.addAll(Arrays.asList(bulkItemResponses.getItems()));
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class SimulateExecutionServiceTests extends ESTestCase {
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
});
|
});
|
||||||
latch.await();
|
latch.await();
|
||||||
SimulateDocumentResult actualItemResponse = holder.getAcquire();
|
SimulateDocumentResult actualItemResponse = holder.get();
|
||||||
assertThat(processor.getInvokedCounter(), equalTo(2));
|
assertThat(processor.getInvokedCounter(), equalTo(2));
|
||||||
assertThat(actualItemResponse, instanceOf(SimulateDocumentVerboseResult.class));
|
assertThat(actualItemResponse, instanceOf(SimulateDocumentVerboseResult.class));
|
||||||
SimulateDocumentVerboseResult simulateDocumentVerboseResult = (SimulateDocumentVerboseResult) actualItemResponse;
|
SimulateDocumentVerboseResult simulateDocumentVerboseResult = (SimulateDocumentVerboseResult) actualItemResponse;
|
||||||
|
@ -106,7 +106,7 @@ public class SimulateExecutionServiceTests extends ESTestCase {
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
});
|
});
|
||||||
latch.await();
|
latch.await();
|
||||||
SimulateDocumentResult actualItemResponse = holder.getAcquire();
|
SimulateDocumentResult actualItemResponse = holder.get();
|
||||||
assertThat(processor.getInvokedCounter(), equalTo(2));
|
assertThat(processor.getInvokedCounter(), equalTo(2));
|
||||||
assertThat(actualItemResponse, instanceOf(SimulateDocumentBaseResult.class));
|
assertThat(actualItemResponse, instanceOf(SimulateDocumentBaseResult.class));
|
||||||
SimulateDocumentBaseResult simulateDocumentBaseResult = (SimulateDocumentBaseResult) actualItemResponse;
|
SimulateDocumentBaseResult simulateDocumentBaseResult = (SimulateDocumentBaseResult) actualItemResponse;
|
||||||
|
|
|
@ -582,7 +582,7 @@ public class IngestServiceTests extends ESTestCase {
|
||||||
ingestService.executeBulkRequest(bulkRequest.numberOfActions(), bulkRequest.requests(), failureHandler,
|
ingestService.executeBulkRequest(bulkRequest.numberOfActions(), bulkRequest.requests(), failureHandler,
|
||||||
completionHandler, indexReq -> {});
|
completionHandler, indexReq -> {});
|
||||||
verify(failureHandler, times(1)).accept(
|
verify(failureHandler, times(1)).accept(
|
||||||
argThat(new CustomTypeSafeMatcher<>("failure handler was not called with the expected arguments") {
|
argThat(new CustomTypeSafeMatcher<Integer>("failure handler was not called with the expected arguments") {
|
||||||
@Override
|
@Override
|
||||||
protected boolean matchesSafely(Integer item) {
|
protected boolean matchesSafely(Integer item) {
|
||||||
return item == 1;
|
return item == 1;
|
||||||
|
|
Loading…
Reference in New Issue