From 2c0d9d779bbcee73302d462e7f6e7e5e5f309a66 Mon Sep 17 00:00:00 2001 From: Jan Kuipers Date: Fri, 26 Sep 2025 09:43:10 +0200 Subject: [PATCH 1/2] Increase wait time in AdaptiveAllocationsScalerServiceTests --- .../AdaptiveAllocationsScalerServiceTests.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/inference/adaptiveallocations/AdaptiveAllocationsScalerServiceTests.java b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/inference/adaptiveallocations/AdaptiveAllocationsScalerServiceTests.java index 9e1f0c280ba54..22a87bfa5dedf 100644 --- a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/inference/adaptiveallocations/AdaptiveAllocationsScalerServiceTests.java +++ b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/inference/adaptiveallocations/AdaptiveAllocationsScalerServiceTests.java @@ -201,7 +201,7 @@ public void test_scaleUp() { return Void.TYPE; }).when(client).execute(eq(GetDeploymentStatsAction.INSTANCE), eq(new GetDeploymentStatsAction.Request("test-deployment")), any()); - safeSleep(1200); + safeSleep(1500); verify(client, times(1)).threadPool(); verify(client, times(1)).execute(eq(GetDeploymentStatsAction.INSTANCE), any(), any()); @@ -286,6 +286,7 @@ public void test_scaleDownToZero_whenNoRequests() { verifyNoMoreInteractions(client, clusterService); reset(client, clusterService); + // First cycle: 1 inference request, so no need for scaling. when(client.threadPool()).thenReturn(threadPool); doAnswer(invocationOnMock -> { @@ -295,7 +296,7 @@ public void test_scaleDownToZero_whenNoRequests() { return Void.TYPE; }).when(client).execute(eq(GetDeploymentStatsAction.INSTANCE), eq(new GetDeploymentStatsAction.Request("test-deployment")), any()); - safeSleep(1200); + safeSleep(1500); verify(client, times(1)).threadPool(); verify(client, times(1)).execute(eq(GetDeploymentStatsAction.INSTANCE), any(), any()); @@ -418,7 +419,7 @@ public void test_noScaleDownToZero_whenRecentlyScaledUpByOtherNode() { return Void.TYPE; }).when(client).execute(eq(GetDeploymentStatsAction.INSTANCE), eq(new GetDeploymentStatsAction.Request("test-deployment")), any()); - safeSleep(1200); + safeSleep(1500); verify(client, times(1)).threadPool(); verify(client, times(1)).execute(eq(GetDeploymentStatsAction.INSTANCE), any(), any()); @@ -572,5 +573,4 @@ private StartTrainedModelDeploymentAction.TaskParams taskParams(int numAllocatio 100L ); } - } From ac39991d857925da262d1bf1f3e2db9ed7574b29 Mon Sep 17 00:00:00 2001 From: elasticsearchmachine Date: Fri, 26 Sep 2025 08:00:23 +0000 Subject: [PATCH 2/2] [CI] Auto commit changes from spotless --- .../AdaptiveAllocationsScalerServiceTests.java | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/inference/adaptiveallocations/AdaptiveAllocationsScalerServiceTests.java b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/inference/adaptiveallocations/AdaptiveAllocationsScalerServiceTests.java index 22a87bfa5dedf..47472f9305074 100644 --- a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/inference/adaptiveallocations/AdaptiveAllocationsScalerServiceTests.java +++ b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/inference/adaptiveallocations/AdaptiveAllocationsScalerServiceTests.java @@ -286,7 +286,6 @@ public void test_scaleDownToZero_whenNoRequests() { verifyNoMoreInteractions(client, clusterService); reset(client, clusterService); - // First cycle: 1 inference request, so no need for scaling. when(client.threadPool()).thenReturn(threadPool); doAnswer(invocationOnMock -> {