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<>();