From ae61fc47803f75a80611b0f7e7dab0ba29bbb0f2 Mon Sep 17 00:00:00 2001 From: Daniel Mitterdorfer Date: Fri, 22 Apr 2016 13:28:12 +0200 Subject: [PATCH] Increase number of concurrent requests in NettyHttpRequestSizeLimitIT For some seeds the number of concurrent requests previously defined in NettyHttpRequestSizeLimitIT was too low to trigger the intended breaker limit. With this commit we increase the number of concurrent requests that are sent to the test cluster thus triggering the limit. --- .../http/netty/NettyHttpRequestSizeLimitIT.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/http/netty/NettyHttpRequestSizeLimitIT.java b/core/src/test/java/org/elasticsearch/http/netty/NettyHttpRequestSizeLimitIT.java index e9787677f4b..632df308e99 100644 --- a/core/src/test/java/org/elasticsearch/http/netty/NettyHttpRequestSizeLimitIT.java +++ b/core/src/test/java/org/elasticsearch/http/netty/NettyHttpRequestSizeLimitIT.java @@ -68,17 +68,10 @@ public class NettyHttpRequestSizeLimitIT extends ESIntegTestCase { } @SuppressWarnings("unchecked") - Tuple[] requests = new Tuple[] { - Tuple.tuple("/index/type/_bulk", bulkRequest), - Tuple.tuple("/index/type/_bulk", bulkRequest), - Tuple.tuple("/index/type/_bulk", bulkRequest), - Tuple.tuple("/index/type/_bulk", bulkRequest), - Tuple.tuple("/index/type/_bulk", bulkRequest), - Tuple.tuple("/index/type/_bulk", bulkRequest), - Tuple.tuple("/index/type/_bulk", bulkRequest), - Tuple.tuple("/index/type/_bulk", bulkRequest), - Tuple.tuple("/index/type/_bulk", bulkRequest) - }; + Tuple[] requests = new Tuple[150]; + for (int i = 0; i < requests.length; i++) { + requests[i] = Tuple.tuple("/index/type/_bulk", bulkRequest); + } HttpServerTransport httpServerTransport = internalCluster().getInstance(HttpServerTransport.class); InetSocketTransportAddress inetSocketTransportAddress = (InetSocketTransportAddress) randomFrom(httpServerTransport.boundAddress