Balance request sizes in NettyHttpRequestSizeLimitIT
This test should demonstrate that a single (larger) request is processed but on of multiple large concurrent requests is rejected. This test broke too early under some circumstances in network mode as the limit is quite low. With this commit we reduce the size of the individual large requests but issue more concurrent ones thus increasing stability of this test.
This commit is contained in:
parent
5ce3eb96b0
commit
b9faa13274
|
@ -57,7 +57,7 @@ public class NettyHttpRequestSizeLimitIT extends ESIntegTestCase {
|
||||||
ensureGreen();
|
ensureGreen();
|
||||||
|
|
||||||
// we use the limit size as a (very) rough indication on how many requests we should sent to hit the limit
|
// we use the limit size as a (very) rough indication on how many requests we should sent to hit the limit
|
||||||
int numRequests = LIMIT.bytesAsInt() / 50;
|
int numRequests = LIMIT.bytesAsInt() / 100;
|
||||||
|
|
||||||
StringBuilder bulkRequest = new StringBuilder();
|
StringBuilder bulkRequest = new StringBuilder();
|
||||||
for (int i = 0; i < numRequests; i++) {
|
for (int i = 0; i < numRequests; i++) {
|
||||||
|
@ -69,6 +69,11 @@ public class NettyHttpRequestSizeLimitIT extends ESIntegTestCase {
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
Tuple<String, CharSequence>[] requests = new Tuple[] {
|
Tuple<String, CharSequence>[] 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.tuple("/index/type/_bulk", bulkRequest),
|
Tuple.tuple("/index/type/_bulk", bulkRequest),
|
||||||
|
|
Loading…
Reference in New Issue