|
85 | 85 | import static org.mockito.ArgumentMatchers.any; |
86 | 86 | import static org.mockito.ArgumentMatchers.anyInt; |
87 | 87 | import static org.mockito.ArgumentMatchers.eq; |
88 | | -import static org.mockito.ArgumentMatchers.same; |
89 | 88 | import static org.mockito.Mockito.doAnswer; |
90 | 89 | import static org.mockito.Mockito.mock; |
91 | 90 | import static org.mockito.Mockito.never; |
@@ -425,8 +424,7 @@ public void testIngestLocal() throws Exception { |
425 | 424 | redirectPredicate.capture(), |
426 | 425 | redirectHandler.capture(), |
427 | 426 | failureHandler.capture(), |
428 | | - completionHandler.capture(), |
429 | | - same(writeCoordinationExecutor) |
| 427 | + completionHandler.capture() |
430 | 428 | ); |
431 | 429 | completionHandler.getValue().accept(null, exception); |
432 | 430 | assertTrue(failureCalled.get()); |
@@ -476,8 +474,7 @@ public void testSingleItemBulkActionIngestLocal() throws Exception { |
476 | 474 | any(), |
477 | 475 | any(), |
478 | 476 | failureHandler.capture(), |
479 | | - completionHandler.capture(), |
480 | | - same(writeCoordinationExecutor) |
| 477 | + completionHandler.capture() |
481 | 478 | ); |
482 | 479 | completionHandler.getValue().accept(null, exception); |
483 | 480 | assertTrue(failureCalled.get()); |
@@ -525,8 +522,7 @@ public void testIngestSystemLocal() throws Exception { |
525 | 522 | any(), |
526 | 523 | any(), |
527 | 524 | failureHandler.capture(), |
528 | | - completionHandler.capture(), |
529 | | - same(systemWriteCoordinationExecutor) |
| 525 | + completionHandler.capture() |
530 | 526 | ); |
531 | 527 | completionHandler.getValue().accept(null, exception); |
532 | 528 | assertTrue(failureCalled.get()); |
@@ -558,7 +554,7 @@ public void testIngestForward() throws Exception { |
558 | 554 | ActionTestUtils.execute(action, null, bulkRequest, listener); |
559 | 555 |
|
560 | 556 | // should not have executed ingest locally |
561 | | - verify(ingestService, never()).executeBulkRequest(eq(projectId), anyInt(), any(), any(), any(), any(), any(), any(), any()); |
| 557 | + verify(ingestService, never()).executeBulkRequest(eq(projectId), anyInt(), any(), any(), any(), any(), any(), any()); |
562 | 558 | // but instead should have sent to a remote node with the transport service |
563 | 559 | ArgumentCaptor<DiscoveryNode> node = ArgumentCaptor.forClass(DiscoveryNode.class); |
564 | 560 | verify(transportService).sendRequest(node.capture(), eq(TransportBulkAction.NAME), any(), remoteResponseHandler.capture()); |
@@ -598,7 +594,7 @@ public void testSingleItemBulkActionIngestForward() throws Exception { |
598 | 594 | ActionTestUtils.execute(singleItemBulkWriteAction, null, indexRequest, listener); |
599 | 595 |
|
600 | 596 | // should not have executed ingest locally |
601 | | - verify(ingestService, never()).executeBulkRequest(eq(projectId), anyInt(), any(), any(), any(), any(), any(), any(), any()); |
| 597 | + verify(ingestService, never()).executeBulkRequest(eq(projectId), anyInt(), any(), any(), any(), any(), any(), any()); |
602 | 598 | // but instead should have sent to a remote node with the transport service |
603 | 599 | ArgumentCaptor<DiscoveryNode> node = ArgumentCaptor.forClass(DiscoveryNode.class); |
604 | 600 | verify(transportService).sendRequest(node.capture(), eq(TransportBulkAction.NAME), any(), remoteResponseHandler.capture()); |
@@ -686,8 +682,7 @@ private void validatePipelineWithBulkUpsert(@Nullable String indexRequestIndexNa |
686 | 682 | any(), |
687 | 683 | any(), |
688 | 684 | failureHandler.capture(), |
689 | | - completionHandler.capture(), |
690 | | - same(writeCoordinationExecutor) |
| 685 | + completionHandler.capture() |
691 | 686 | ); |
692 | 687 | assertEquals(indexRequest1.getPipeline(), "default_pipeline"); |
693 | 688 | assertEquals(indexRequest2.getPipeline(), "default_pipeline"); |
@@ -737,8 +732,7 @@ public void testDoExecuteCalledTwiceCorrectly() throws Exception { |
737 | 732 | any(), |
738 | 733 | any(), |
739 | 734 | failureHandler.capture(), |
740 | | - completionHandler.capture(), |
741 | | - same(writeCoordinationExecutor) |
| 735 | + completionHandler.capture() |
742 | 736 | ); |
743 | 737 | completionHandler.getValue().accept(null, exception); |
744 | 738 | assertFalse(action.indexCreated); // still no index yet, the ingest node failed. |
@@ -831,8 +825,7 @@ public void testFindDefaultPipelineFromTemplateMatch() { |
831 | 825 | any(), |
832 | 826 | any(), |
833 | 827 | failureHandler.capture(), |
834 | | - completionHandler.capture(), |
835 | | - same(writeCoordinationExecutor) |
| 828 | + completionHandler.capture() |
836 | 829 | ); |
837 | 830 | } |
838 | 831 |
|
@@ -872,8 +865,7 @@ public void testFindDefaultPipelineFromV2TemplateMatch() { |
872 | 865 | any(), |
873 | 866 | any(), |
874 | 867 | failureHandler.capture(), |
875 | | - completionHandler.capture(), |
876 | | - same(writeCoordinationExecutor) |
| 868 | + completionHandler.capture() |
877 | 869 | ); |
878 | 870 | } |
879 | 871 |
|
@@ -902,8 +894,7 @@ public void testIngestCallbackExceptionHandled() throws Exception { |
902 | 894 | any(), |
903 | 895 | any(), |
904 | 896 | failureHandler.capture(), |
905 | | - completionHandler.capture(), |
906 | | - same(writeCoordinationExecutor) |
| 897 | + completionHandler.capture() |
907 | 898 | ); |
908 | 899 | indexRequest1.autoGenerateId(); |
909 | 900 | completionHandler.getValue().accept(Thread.currentThread(), null); |
@@ -942,8 +933,7 @@ private void validateDefaultPipeline(IndexRequest indexRequest) { |
942 | 933 | any(), |
943 | 934 | any(), |
944 | 935 | failureHandler.capture(), |
945 | | - completionHandler.capture(), |
946 | | - same(writeCoordinationExecutor) |
| 936 | + completionHandler.capture() |
947 | 937 | ); |
948 | 938 | assertEquals(indexRequest.getPipeline(), "default_pipeline"); |
949 | 939 | completionHandler.getValue().accept(null, exception); |
|
0 commit comments