diff --git a/core/src/test/java/org/elasticsearch/common/cache/CacheTests.java b/core/src/test/java/org/elasticsearch/common/cache/CacheTests.java index 369aa8bcafd..d0b7d998dd5 100644 --- a/core/src/test/java/org/elasticsearch/common/cache/CacheTests.java +++ b/core/src/test/java/org/elasticsearch/common/cache/CacheTests.java @@ -492,7 +492,7 @@ public class CacheTests extends ESTestCase { } public void testComputeIfAbsentCallsOnce() throws InterruptedException { - int numberOfThreads = randomIntBetween(2, 200); + int numberOfThreads = randomIntBetween(2, 32); final Cache cache = CacheBuilder.builder().build(); List threads = new ArrayList<>(); AtomicReferenceArray flags = new AtomicReferenceArray(numberOfEntries); @@ -558,7 +558,7 @@ public class CacheTests extends ESTestCase { } } - int numberOfThreads = randomIntBetween(2, 256); + int numberOfThreads = randomIntBetween(2, 32); final Cache cache = CacheBuilder.builder().build(); CountDownLatch latch = new CountDownLatch(1 + numberOfThreads); CountDownLatch deadlockLatch = new CountDownLatch(numberOfThreads); @@ -626,7 +626,7 @@ public class CacheTests extends ESTestCase { } public void testCachePollution() throws InterruptedException { - int numberOfThreads = randomIntBetween(2, 200); + int numberOfThreads = randomIntBetween(2, 32); final Cache cache = CacheBuilder.builder().build(); CountDownLatch latch = new CountDownLatch(1 + numberOfThreads); List threads = new ArrayList<>(); @@ -676,7 +676,7 @@ public class CacheTests extends ESTestCase { // test that the cache is not corrupted under lots of concurrent modifications, even hitting the same key // here be dragons: this test did catch one subtle bug during development; do not remove lightly public void testTorture() throws InterruptedException { - int numberOfThreads = randomIntBetween(2, 200); + int numberOfThreads = randomIntBetween(2, 32); final Cache cache = CacheBuilder.builder() .setMaximumWeight(1000)