Test: bound number of requests in IndexLifecycleManagerIntegTests
The IndexLifecycleManagerIntegTests has a method that tests concurrency and executes a large number of requests in parallel. On some machines, this can actually overwhelm a thread pool and cause the test to fail for the wrong reasons. This commit bounds the total number of requests to 100. Original commit: elastic/x-pack-elasticsearch@07613ada51
This commit is contained in:
parent
f816b2e850
commit
409492808f
|
@ -27,7 +27,8 @@ public class IndexLifecycleManagerIntegTests extends SecurityIntegTestCase {
|
|||
assertSecurityIndexWriteable();
|
||||
final int processors = Runtime.getRuntime().availableProcessors();
|
||||
final int numThreads = scaledRandomIntBetween((processors + 1) / 2, 4 * processors);
|
||||
final int numRequests = scaledRandomIntBetween(4, 16);
|
||||
final int maxNumRequests = 100 / numThreads; // bound to a maximum of 100 requests
|
||||
final int numRequests = scaledRandomIntBetween(4, maxNumRequests);
|
||||
|
||||
final List<ActionFuture<PutUserResponse>> futures = new CopyOnWriteArrayList<>();
|
||||
final List<Exception> exceptions = new CopyOnWriteArrayList<>();
|
||||
|
|
Loading…
Reference in New Issue