Skip to content

Commit fc9afa2

Browse files
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.
1 parent 588203e commit fc9afa2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/test/java/org/elasticsearch/action/bulk/BulkProcessorIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public void testBulkProcessorFlush() throws InterruptedException {
105105
public void testBulkProcessorConcurrentRequests() throws Exception {
106106
int bulkActions = randomIntBetween(10, 100);
107107
int numDocs = randomIntBetween(bulkActions, bulkActions + 100);
108-
int concurrentRequests = randomIntBetween(0, 10);
108+
int concurrentRequests = randomIntBetween(0, 7);
109109

110110
int expectedBulkActions = numDocs / bulkActions;
111111

@@ -141,7 +141,7 @@ public void testBulkProcessorConcurrentRequests() throws Exception {
141141

142142
Set<String> ids = new HashSet<>();
143143
for (BulkItemResponse bulkItemResponse : listener.bulkItems) {
144-
assertThat(bulkItemResponse.isFailed(), equalTo(false));
144+
assertThat(bulkItemResponse.getFailureMessage(), bulkItemResponse.isFailed(), equalTo(false));
145145
assertThat(bulkItemResponse.getIndex(), equalTo("test"));
146146
assertThat(bulkItemResponse.getType(), equalTo("test"));
147147
//with concurrent requests > 1 we can't rely on the order of the bulk requests

0 commit comments

Comments
 (0)