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@da7d0ce0ce
This commit is contained in:
jaymode 2017-12-04 10:45:18 -07:00
parent b4a317ee94
commit 6487557e61
1 changed files with 1 additions and 1 deletions

View File

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