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@747941a6b1ad38fc5b6beb40a9bcd6878051c71c
@@ -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<ActionFuture<PutUserResponse>> futures = new CopyOnWriteArrayList<>();
final List<Exception> exceptions = new CopyOnWriteArrayList<>();
