From 7c819fd2aa7cc591c133e1f415f70e687a98ba09 Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Wed, 24 Apr 2019 20:46:21 +0200 Subject: [PATCH] Fix BulkRejectionIT (#41446) (#41500) * Due to #40866 one of the two parallel bulk requests can randomly be rejected outright when the write queue is full already, we can catch this situation and ignore it since we can still have the rejection for the dynamic mapping udate for the other reuqest and it's somewhat rare to run into this anyway * Closes #41363 --- .../org/elasticsearch/action/bulk/BulkRejectionIT.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/action/bulk/BulkRejectionIT.java b/server/src/test/java/org/elasticsearch/action/bulk/BulkRejectionIT.java index 1d7a5245a22..900f50a9be0 100644 --- a/server/src/test/java/org/elasticsearch/action/bulk/BulkRejectionIT.java +++ b/server/src/test/java/org/elasticsearch/action/bulk/BulkRejectionIT.java @@ -22,6 +22,7 @@ import org.elasticsearch.action.ActionFuture; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.support.WriteRequest; import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException; import org.elasticsearch.test.ESIntegTestCase; import java.util.Collections; @@ -49,7 +50,6 @@ public class BulkRejectionIT extends ESIntegTestCase { return 5; } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/41363") public void testBulkRejectionAfterDynamicMappingUpdate() throws Exception { final String index = "test"; assertAcked(prepareCreate(index)); @@ -68,8 +68,12 @@ public class BulkRejectionIT extends ESIntegTestCase { } final ActionFuture bulkFuture1 = client().bulk(request1); final ActionFuture bulkFuture2 = client().bulk(request2); - bulkFuture1.actionGet(); - bulkFuture2.actionGet(); + try { + bulkFuture1.actionGet(); + bulkFuture2.actionGet(); + } catch (EsRejectedExecutionException e) { + // ignored, one of the two bulk requests was rejected outright due to the write queue being full + } internalCluster().assertSeqNos(); } }