55
55
import org .elasticsearch .threadpool .TestThreadPool ;
56
56
import org .elasticsearch .threadpool .ThreadPool ;
57
57
import org .elasticsearch .transport .Transport ;
58
- import org .elasticsearch .transport .TransportException ;
59
58
import org .elasticsearch .transport .TransportInterceptor ;
60
59
import org .elasticsearch .transport .TransportRequest ;
61
60
import org .elasticsearch .transport .TransportRequestOptions ;
@@ -133,7 +132,7 @@ public void testHappyCluster() throws Exception {
133
132
OriginalIndices .NONE ,
134
133
randomNonNegativeLong (),
135
134
indices .toArray (new String [0 ]),
136
- transportService .threadPool .executor (ThreadPool .Names .MANAGEMENT ),
135
+ transportService .threadPool .executor (ThreadPool .Names .SEARCH_COORDINATION ),
137
136
responseCollector ::addIndexResponse ,
138
137
responseCollector ::addIndexFailure ,
139
138
responseCollector ::onComplete );
@@ -199,7 +198,7 @@ public void testRetryThenOk() throws Exception {
199
198
OriginalIndices .NONE ,
200
199
randomNonNegativeLong (),
201
200
indices .toArray (new String [0 ]),
202
- transportService .threadPool .executor (ThreadPool .Names .MANAGEMENT ),
201
+ transportService .threadPool .executor (ThreadPool .Names .SEARCH_COORDINATION ),
203
202
responseCollector ::addIndexResponse ,
204
203
responseCollector ::addIndexFailure ,
205
204
responseCollector ::onComplete
@@ -317,7 +316,7 @@ public void testRetryButFails() throws Exception {
317
316
OriginalIndices .NONE ,
318
317
randomNonNegativeLong (),
319
318
indices .toArray (new String [0 ]),
320
- transportService .threadPool .executor (ThreadPool .Names .MANAGEMENT ),
319
+ transportService .threadPool .executor (ThreadPool .Names .SEARCH_COORDINATION ),
321
320
responseCollector ::addIndexResponse ,
322
321
responseCollector ::addIndexFailure ,
323
322
responseCollector ::onComplete );
@@ -435,7 +434,7 @@ public void testSuccessWithAnyMatch() throws Exception {
435
434
OriginalIndices .NONE ,
436
435
randomNonNegativeLong (),
437
436
indices .toArray (new String [0 ]),
438
- transportService .threadPool .executor (ThreadPool .Names .MANAGEMENT ),
437
+ transportService .threadPool .executor (ThreadPool .Names .SEARCH_COORDINATION ),
439
438
responseCollector ::addIndexResponse ,
440
439
responseCollector ::addIndexFailure ,
441
440
responseCollector ::onComplete );
@@ -524,7 +523,7 @@ public void testStopAfterAllShardsUnmatched() throws Exception {
524
523
OriginalIndices .NONE ,
525
524
randomNonNegativeLong (),
526
525
indices .toArray (new String [0 ]),
527
- transportService .threadPool .executor (ThreadPool .Names .MANAGEMENT ),
526
+ transportService .threadPool .executor (ThreadPool .Names .SEARCH_COORDINATION ),
528
527
responseCollector ::addIndexResponse ,
529
528
responseCollector ::addIndexFailure ,
530
529
responseCollector ::onComplete
@@ -753,7 +752,7 @@ protected void doClose() throws IOException {
753
752
754
753
@ SuppressWarnings ("unchecked" )
755
754
<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 () {
757
756
@ Override
758
757
public void onFailure (Exception e ) {
759
758
throw new AssertionError (e );
@@ -765,20 +764,6 @@ protected void doRun() {
765
764
}
766
765
});
767
766
}
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
- }
782
767
}
783
768
784
769
static FieldCapabilitiesRequest randomFieldCapRequest (boolean withFilter ) {
0 commit comments