5555import org .elasticsearch .threadpool .TestThreadPool ;
5656import org .elasticsearch .threadpool .ThreadPool ;
5757import org .elasticsearch .transport .Transport ;
58- import org .elasticsearch .transport .TransportException ;
5958import org .elasticsearch .transport .TransportInterceptor ;
6059import org .elasticsearch .transport .TransportRequest ;
6160import org .elasticsearch .transport .TransportRequestOptions ;
@@ -133,7 +132,7 @@ public void testHappyCluster() throws Exception {
133132 OriginalIndices .NONE ,
134133 randomNonNegativeLong (),
135134 indices .toArray (new String [0 ]),
136- transportService .threadPool .executor (ThreadPool .Names .MANAGEMENT ),
135+ transportService .threadPool .executor (ThreadPool .Names .SEARCH_COORDINATION ),
137136 responseCollector ::addIndexResponse ,
138137 responseCollector ::addIndexFailure ,
139138 responseCollector ::onComplete );
@@ -199,7 +198,7 @@ public void testRetryThenOk() throws Exception {
199198 OriginalIndices .NONE ,
200199 randomNonNegativeLong (),
201200 indices .toArray (new String [0 ]),
202- transportService .threadPool .executor (ThreadPool .Names .MANAGEMENT ),
201+ transportService .threadPool .executor (ThreadPool .Names .SEARCH_COORDINATION ),
203202 responseCollector ::addIndexResponse ,
204203 responseCollector ::addIndexFailure ,
205204 responseCollector ::onComplete
@@ -317,7 +316,7 @@ public void testRetryButFails() throws Exception {
317316 OriginalIndices .NONE ,
318317 randomNonNegativeLong (),
319318 indices .toArray (new String [0 ]),
320- transportService .threadPool .executor (ThreadPool .Names .MANAGEMENT ),
319+ transportService .threadPool .executor (ThreadPool .Names .SEARCH_COORDINATION ),
321320 responseCollector ::addIndexResponse ,
322321 responseCollector ::addIndexFailure ,
323322 responseCollector ::onComplete );
@@ -435,7 +434,7 @@ public void testSuccessWithAnyMatch() throws Exception {
435434 OriginalIndices .NONE ,
436435 randomNonNegativeLong (),
437436 indices .toArray (new String [0 ]),
438- transportService .threadPool .executor (ThreadPool .Names .MANAGEMENT ),
437+ transportService .threadPool .executor (ThreadPool .Names .SEARCH_COORDINATION ),
439438 responseCollector ::addIndexResponse ,
440439 responseCollector ::addIndexFailure ,
441440 responseCollector ::onComplete );
@@ -524,7 +523,7 @@ public void testStopAfterAllShardsUnmatched() throws Exception {
524523 OriginalIndices .NONE ,
525524 randomNonNegativeLong (),
526525 indices .toArray (new String [0 ]),
527- transportService .threadPool .executor (ThreadPool .Names .MANAGEMENT ),
526+ transportService .threadPool .executor (ThreadPool .Names .SEARCH_COORDINATION ),
528527 responseCollector ::addIndexResponse ,
529528 responseCollector ::addIndexFailure ,
530529 responseCollector ::onComplete
@@ -753,7 +752,7 @@ protected void doClose() throws IOException {
753752
754753 @ SuppressWarnings ("unchecked" )
755754 <T extends TransportResponse > void sendResponse (TransportResponseHandler <T > handler , TransportResponse resp ) {
756- threadPool .executor (ThreadPool .Names .MANAGEMENT ).submit (new AbstractRunnable () {
755+ threadPool .executor (ThreadPool .Names .SEARCH_COORDINATION ).submit (new AbstractRunnable () {
757756 @ Override
758757 public void onFailure (Exception e ) {
759758 throw new AssertionError (e );
@@ -765,20 +764,6 @@ protected void doRun() {
765764 }
766765 });
767766 }
768-
769- <T extends TransportResponse > void sendFailure (TransportResponseHandler <T > handler , Exception e ) {
770- threadPool .executor (ThreadPool .Names .MANAGEMENT ).submit (new AbstractRunnable () {
771- @ Override
772- public void onFailure (Exception e ) {
773- throw new AssertionError (e );
774- }
775-
776- @ Override
777- protected void doRun () {
778- handler .handleException (new TransportException (e ));
779- }
780- });
781- }
782767 }
783768
784769 static FieldCapabilitiesRequest randomFieldCapRequest (boolean withFilter ) {
0 commit comments