From dc371ef59352ac7d2d5e59ad393f817bf44e2fd0 Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Wed, 9 Jan 2019 13:34:38 +0100 Subject: [PATCH] [Tests] Fix ReopenWhileClosingIT with correct min num shards The test intercepts TransportVerifyShardBeforeCloseAction shard requests, so it needs a minimum of 2 primary shards on 2 different nodes to correctly intercepts requests. --- .../elasticsearch/indices/state/ReopenWhileClosingIT.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/src/test/java/org/elasticsearch/indices/state/ReopenWhileClosingIT.java b/server/src/test/java/org/elasticsearch/indices/state/ReopenWhileClosingIT.java index 901c4f327af..083c5ab1f55 100644 --- a/server/src/test/java/org/elasticsearch/indices/state/ReopenWhileClosingIT.java +++ b/server/src/test/java/org/elasticsearch/indices/state/ReopenWhileClosingIT.java @@ -58,6 +58,11 @@ public class ReopenWhileClosingIT extends ESIntegTestCase { return singletonList(MockTransportService.TestPlugin.class); } + @Override + protected int minimumNumberOfShards() { + return 2; + } + public void testReopenDuringClose() throws Exception { final String indexName = "test"; createIndexWithDocs(indexName);