Skip to content

Commit 0d1f0df

Browse files
Renaming for executors
1 parent b7c1f2f commit 0d1f0df

File tree

69 files changed

+138
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+138
-138
lines changed

x-pack/plugin/inference/src/internalClusterTest/java/org/elasticsearch/xpack/inference/integration/InferenceRevokeDefaultEndpointsIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
import java.util.List;
4141
import java.util.concurrent.TimeUnit;
4242

43-
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityPools;
43+
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityExecutors;
4444
import static org.elasticsearch.xpack.inference.Utils.mockClusterServiceEmpty;
4545
import static org.elasticsearch.xpack.inference.external.http.Utils.getUrl;
4646
import static org.elasticsearch.xpack.inference.services.ServiceComponentsTests.createWithEmptySettings;
@@ -59,7 +59,7 @@ public class InferenceRevokeDefaultEndpointsIT extends ESSingleNodeTestCase {
5959

6060
@Before
6161
public void createComponents() throws Exception {
62-
threadPool = createThreadPool(inferenceUtilityPools());
62+
threadPool = createThreadPool(inferenceUtilityExecutors());
6363
webServer.start();
6464
gatewayUrl = getUrl(webServer);
6565
modelRegistry = node().injector().getInstance(ModelRegistry.class);

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/Utils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static ClusterService mockClusterService(Settings settings) {
7171
return clusterService;
7272
}
7373

74-
public static ScalingExecutorBuilder[] inferenceUtilityPools() {
74+
public static ScalingExecutorBuilder[] inferenceUtilityExecutors() {
7575
return new ScalingExecutorBuilder[] {new ScalingExecutorBuilder(
7676
UTILITY_THREAD_POOL_NAME,
7777
1,

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/action/TransportDeleteInferenceEndpointActionTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import java.util.Map;
3434
import java.util.Optional;
3535

36-
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityPools;
36+
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityExecutors;
3737
import static org.hamcrest.Matchers.containsString;
3838
import static org.hamcrest.Matchers.is;
3939
import static org.mockito.ArgumentMatchers.any;
@@ -59,7 +59,7 @@ public class TransportDeleteInferenceEndpointActionTests extends ESTestCase {
5959
@Before
6060
public void setUp() throws Exception {
6161
super.setUp();
62-
threadPool = createThreadPool(inferenceUtilityPools());
62+
threadPool = createThreadPool(inferenceUtilityExecutors());
6363
mockModelRegistry = mock(ModelRegistry.class);
6464
mockInferenceServiceRegistry = mock(InferenceServiceRegistry.class);
6565
action = new TransportDeleteInferenceEndpointAction(

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/common/AdjustableCapacityBlockingQueueTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import java.util.concurrent.TimeUnit;
2525
import java.util.concurrent.TimeoutException;
2626

27-
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityPools;
27+
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityExecutors;
2828
import static org.hamcrest.Matchers.is;
2929

3030
public class AdjustableCapacityBlockingQueueTests extends ESTestCase {
@@ -46,7 +46,7 @@ public BlockingQueue<Integer> create() {
4646

4747
@Before
4848
public void init() {
49-
threadPool = createThreadPool(inferenceUtilityPools());
49+
threadPool = createThreadPool(inferenceUtilityExecutors());
5050
}
5151

5252
@After

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/HttpClientManagerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import java.nio.charset.StandardCharsets;
2626
import java.util.concurrent.TimeUnit;
2727

28-
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityPools;
28+
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityExecutors;
2929
import static org.elasticsearch.xpack.inference.Utils.mockClusterService;
3030
import static org.elasticsearch.xpack.inference.Utils.mockClusterServiceEmpty;
3131
import static org.elasticsearch.xpack.inference.external.http.HttpClientTests.createHttpPost;
@@ -46,7 +46,7 @@ public class HttpClientManagerTests extends ESTestCase {
4646
@Before
4747
public void init() throws Exception {
4848
webServer.start();
49-
threadPool = createThreadPool(inferenceUtilityPools());
49+
threadPool = createThreadPool(inferenceUtilityExecutors());
5050
}
5151

5252
@After

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/HttpClientTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
import java.util.concurrent.Future;
4545
import java.util.concurrent.TimeUnit;
4646

47-
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityPools;
47+
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityExecutors;
4848
import static org.elasticsearch.xpack.inference.Utils.mockClusterService;
4949
import static org.elasticsearch.xpack.inference.logging.ThrottlerManagerTests.mockThrottlerManager;
5050
import static org.hamcrest.Matchers.equalTo;
@@ -65,7 +65,7 @@ public class HttpClientTests extends ESTestCase {
6565
@Before
6666
public void init() throws Exception {
6767
webServer.start();
68-
threadPool = createThreadPool(inferenceUtilityPools());
68+
threadPool = createThreadPool(inferenceUtilityExecutors());
6969
}
7070

7171
@After

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/StreamingHttpResultPublisherTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import java.util.concurrent.atomic.AtomicReference;
3535

3636
import static org.elasticsearch.xpack.inference.InferencePlugin.UTILITY_THREAD_POOL_NAME;
37-
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityPools;
37+
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityExecutors;
3838
import static org.hamcrest.Matchers.equalTo;
3939
import static org.hamcrest.Matchers.instanceOf;
4040
import static org.hamcrest.Matchers.is;
@@ -507,7 +507,7 @@ public void testDoubleSubscribeFails() {
507507
*/
508508
public void testReuseMlThread() throws ExecutionException, InterruptedException, TimeoutException {
509509
try {
510-
threadPool = spy(createThreadPool(inferenceUtilityPools()));
510+
threadPool = spy(createThreadPool(inferenceUtilityExecutors()));
511511
publisher = new StreamingHttpResultPublisher(threadPool, settings, listener());
512512
var subscriber = new TestSubscriber();
513513
publisher.responseReceived(mock(HttpResponse.class));
@@ -537,7 +537,7 @@ public void testReuseMlThread() throws ExecutionException, InterruptedException,
537537
public void testCancelBreaksInfiniteLoop() throws Exception {
538538
try {
539539
var futureHolder = new AtomicReference<CompletableFuture<Void>>();
540-
threadPool = spy(createThreadPool(inferenceUtilityPools()));
540+
threadPool = spy(createThreadPool(inferenceUtilityExecutors()));
541541
doAnswer(utilityThreadPool -> {
542542
var realExecutorService = (ExecutorService) utilityThreadPool.callRealMethod();
543543
var executorServiceSpy = spy(realExecutorService);

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/sender/HttpRequestSenderTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
import static org.elasticsearch.core.Strings.format;
4848
import static org.elasticsearch.xpack.core.inference.results.TextEmbeddingFloatResultsTests.buildExpectationFloat;
49-
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityPools;
49+
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityExecutors;
5050
import static org.elasticsearch.xpack.inference.Utils.mockClusterServiceEmpty;
5151
import static org.elasticsearch.xpack.inference.external.http.Utils.entityAsMap;
5252
import static org.elasticsearch.xpack.inference.external.http.Utils.getUrl;
@@ -75,7 +75,7 @@ public class HttpRequestSenderTests extends ESTestCase {
7575
@Before
7676
public void init() throws Exception {
7777
webServer.start();
78-
threadPool = createThreadPool(inferenceUtilityPools());
78+
threadPool = createThreadPool(inferenceUtilityExecutors());
7979
clientManager = HttpClientManager.create(Settings.EMPTY, threadPool, mockClusterServiceEmpty(), mock(ThrottlerManager.class));
8080
threadRef.set(null);
8181
}

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/sender/RequestExecutorServiceTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
import java.util.concurrent.TimeoutException;
4343

4444
import static org.elasticsearch.core.Strings.format;
45-
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityPools;
45+
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityExecutors;
4646
import static org.elasticsearch.xpack.inference.common.AdjustableCapacityBlockingQueueTests.mockQueueCreator;
4747
import static org.elasticsearch.xpack.inference.external.http.sender.RequestExecutorServiceSettingsTests.createRequestExecutorServiceSettings;
4848
import static org.elasticsearch.xpack.inference.external.http.sender.RequestExecutorServiceSettingsTests.createRequestExecutorServiceSettingsEmpty;
@@ -63,7 +63,7 @@ public class RequestExecutorServiceTests extends ESTestCase {
6363

6464
@Before
6565
public void init() {
66-
threadPool = createThreadPool(inferenceUtilityPools());
66+
threadPool = createThreadPool(inferenceUtilityExecutors());
6767
}
6868

6969
@After

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/sender/RequestTaskTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import java.util.concurrent.atomic.AtomicReference;
2929

3030
import static org.elasticsearch.core.Strings.format;
31-
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityPools;
31+
import static org.elasticsearch.xpack.inference.Utils.inferenceUtilityExecutors;
3232
import static org.hamcrest.Matchers.is;
3333
import static org.mockito.ArgumentMatchers.any;
3434
import static org.mockito.Mockito.doAnswer;
@@ -45,7 +45,7 @@ public class RequestTaskTests extends ESTestCase {
4545

4646
@Before
4747
public void init() throws Exception {
48-
threadPool = createThreadPool(inferenceUtilityPools());
48+
threadPool = createThreadPool(inferenceUtilityExecutors());
4949
}
5050

5151
@After

0 commit comments

Comments
 (0)