From 578749a5e833e935e27c41d4714d69fce3c8130b Mon Sep 17 00:00:00 2001 From: Jim Ferenczi Date: Wed, 29 Jul 2020 09:47:05 +0200 Subject: [PATCH] Fix AsyncResultsServiceTests#testRetrieveFromMemoryWithExpiration (#60337) This change ensures that the expiration time that is set in the test is long enough to not be triggered by a slow execution. Closes #60255 --- .../xpack/core/async/AsyncResultsServiceTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/async/AsyncResultsServiceTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/async/AsyncResultsServiceTests.java index bd5a1d66dae..ea9920be84a 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/async/AsyncResultsServiceTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/async/AsyncResultsServiceTests.java @@ -154,7 +154,7 @@ public class AsyncResultsServiceTests extends ESSingleNodeTestCase { TestTask task = (TestTask) taskManager.register("test", "test", new TestRequest("test request")); try { boolean shouldExpire = randomBoolean(); - long expirationTime = System.currentTimeMillis() + randomLongBetween(1000, 10000) * (shouldExpire ? -1 : 1); + long expirationTime = System.currentTimeMillis() + randomLongBetween(100000, 1000000) * (shouldExpire ? -1 : 1); task.setExpirationTime(expirationTime); if (updateInitialResultsInStore) {