From fc9afa2bb8abd2437e683b53964a5a9b49bf11c5 Mon Sep 17 00:00:00 2001 From: Daniel Mitterdorfer Date: Thu, 10 Dec 2015 14:24:35 +0100 Subject: [PATCH] Reduce maximum number of concurrent requests in BulkProcessorIT The test configuration with seed A23029712A7EFB34 overwhelmed the pool which is invoked in TransportService#sendLocalRequest(). With this commit we reduce the maximum number of concurrent requests from 10 to 7 and add the failure message to the test output on the failing assertion for easier analysis. --- .../java/org/elasticsearch/action/bulk/BulkProcessorIT.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorIT.java b/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorIT.java index ded2abb494f..237f3a2e821 100644 --- a/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorIT.java +++ b/core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorIT.java @@ -105,7 +105,7 @@ public class BulkProcessorIT extends ESIntegTestCase { public void testBulkProcessorConcurrentRequests() throws Exception { int bulkActions = randomIntBetween(10, 100); int numDocs = randomIntBetween(bulkActions, bulkActions + 100); - int concurrentRequests = randomIntBetween(0, 10); + int concurrentRequests = randomIntBetween(0, 7); int expectedBulkActions = numDocs / bulkActions; @@ -141,7 +141,7 @@ public class BulkProcessorIT extends ESIntegTestCase { Set ids = new HashSet<>(); for (BulkItemResponse bulkItemResponse : listener.bulkItems) { - assertThat(bulkItemResponse.isFailed(), equalTo(false)); + assertThat(bulkItemResponse.getFailureMessage(), bulkItemResponse.isFailed(), equalTo(false)); assertThat(bulkItemResponse.getIndex(), equalTo("test")); assertThat(bulkItemResponse.getType(), equalTo("test")); //with concurrent requests > 1 we can't rely on the order of the bulk requests