Skip to content

Commit 2c0d9d7

Browse files
committed
Increase wait time in AdaptiveAllocationsScalerServiceTests
1 parent e31eb4b commit 2c0d9d7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/inference/adaptiveallocations/AdaptiveAllocationsScalerServiceTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public void test_scaleUp() {
201201
return Void.TYPE;
202202
}).when(client).execute(eq(GetDeploymentStatsAction.INSTANCE), eq(new GetDeploymentStatsAction.Request("test-deployment")), any());
203203

204-
safeSleep(1200);
204+
safeSleep(1500);
205205

206206
verify(client, times(1)).threadPool();
207207
verify(client, times(1)).execute(eq(GetDeploymentStatsAction.INSTANCE), any(), any());
@@ -286,6 +286,7 @@ public void test_scaleDownToZero_whenNoRequests() {
286286
verifyNoMoreInteractions(client, clusterService);
287287
reset(client, clusterService);
288288

289+
289290
// First cycle: 1 inference request, so no need for scaling.
290291
when(client.threadPool()).thenReturn(threadPool);
291292
doAnswer(invocationOnMock -> {
@@ -295,7 +296,7 @@ public void test_scaleDownToZero_whenNoRequests() {
295296
return Void.TYPE;
296297
}).when(client).execute(eq(GetDeploymentStatsAction.INSTANCE), eq(new GetDeploymentStatsAction.Request("test-deployment")), any());
297298

298-
safeSleep(1200);
299+
safeSleep(1500);
299300

300301
verify(client, times(1)).threadPool();
301302
verify(client, times(1)).execute(eq(GetDeploymentStatsAction.INSTANCE), any(), any());
@@ -418,7 +419,7 @@ public void test_noScaleDownToZero_whenRecentlyScaledUpByOtherNode() {
418419
return Void.TYPE;
419420
}).when(client).execute(eq(GetDeploymentStatsAction.INSTANCE), eq(new GetDeploymentStatsAction.Request("test-deployment")), any());
420421

421-
safeSleep(1200);
422+
safeSleep(1500);
422423

423424
verify(client, times(1)).threadPool();
424425
verify(client, times(1)).execute(eq(GetDeploymentStatsAction.INSTANCE), any(), any());
@@ -572,5 +573,4 @@ private StartTrainedModelDeploymentAction.TaskParams taskParams(int numAllocatio
572573
100L
573574
);
574575
}
575-
576576
}

0 commit comments

Comments
 (0)