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:
parent
b4a317ee94
commit
6487557e61
|
@ -28,7 +28,7 @@ public class IndexLifecycleManagerIntegTests extends SecurityIntegTestCase {
|
||||||
final int processors = Runtime.getRuntime().availableProcessors();
|
final int processors = Runtime.getRuntime().availableProcessors();
|
||||||
final int numThreads = scaledRandomIntBetween((processors + 1) / 2, 4 * processors);
|
final int numThreads = scaledRandomIntBetween((processors + 1) / 2, 4 * processors);
|
||||||
final int maxNumRequests = 100 / numThreads; // bound to a maximum of 100 requests
|
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<ActionFuture<PutUserResponse>> futures = new CopyOnWriteArrayList<>();
|
||||||
final List<Exception> exceptions = new CopyOnWriteArrayList<>();
|
final List<Exception> exceptions = new CopyOnWriteArrayList<>();
|
||||||
|
|
Loading…
Reference in New Issue