From 6487557e61a6e6ffde6aa643d53a3af27528e28e Mon Sep 17 00:00:00 2001 From: jaymode Date: Mon, 4 Dec 2017 10:45:18 -0700 Subject: [PATCH] Test: fix min value being greater than max value in IndexLifecycleManagerIntegTests This commit fixes the minimum value being smaller than the maximum value in a call to the scaledRandomIntBetween, which causes the test to fail. Original commit: elastic/x-pack-elasticsearch@da7d0ce0ce1aa7726249ca93198976b7f377d1c6 --- .../xpack/security/support/IndexLifecycleManagerIntegTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/test/java/org/elasticsearch/xpack/security/support/IndexLifecycleManagerIntegTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/support/IndexLifecycleManagerIntegTests.java index e08051959f0..fe8d45a8b63 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/security/support/IndexLifecycleManagerIntegTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/security/support/IndexLifecycleManagerIntegTests.java @@ -28,7 +28,7 @@ public class IndexLifecycleManagerIntegTests extends SecurityIntegTestCase { final int processors = Runtime.getRuntime().availableProcessors(); final int numThreads = scaledRandomIntBetween((processors + 1) / 2, 4 * processors); final int maxNumRequests = 100 / numThreads; // bound to a maximum of 100 requests - final int numRequests = scaledRandomIntBetween(4, maxNumRequests); + final int numRequests = scaledRandomIntBetween(Math.min(4, maxNumRequests), maxNumRequests); final List> futures = new CopyOnWriteArrayList<>(); final List exceptions = new CopyOnWriteArrayList<>();