From e381e08517550ed3d7ad9b23059b819390055ff2 Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Thu, 25 Jul 2019 17:06:37 +0200 Subject: [PATCH 1/2] Ensure cluster is stable in ShrinkIndexIT --- .../action/admin/indices/create/ShrinkIndexIT.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java b/server/src/test/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java index 582ab09a1f868..805ec64d165c4 100644 --- a/server/src/test/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java +++ b/server/src/test/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java @@ -580,7 +580,9 @@ public void testShrinkThenSplitWithFailedNode() throws Exception { .build()).setResizeType(ResizeType.SHRINK).get()); ensureGreen(); + final int nodeCount = cluster().size(); internalCluster().stopRandomNode(InternalTestCluster.nameFilter(shrinkNode)); + ensureStableCluster(nodeCount -1); // demonstrate that the index.routing.allocation.initial_recovery setting from the shrink doesn't carry over into the split index, // because this would cause the shrink to fail as the initial_recovery node is no longer present. From aa4ee99a95c163e5b9ea54385c17a8195ad7fce5 Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Thu, 25 Jul 2019 17:40:11 +0200 Subject: [PATCH 2/2] add space --- .../action/admin/indices/create/ShrinkIndexIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java b/server/src/test/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java index 805ec64d165c4..1ee344e326a00 100644 --- a/server/src/test/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java +++ b/server/src/test/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java @@ -582,7 +582,7 @@ public void testShrinkThenSplitWithFailedNode() throws Exception { final int nodeCount = cluster().size(); internalCluster().stopRandomNode(InternalTestCluster.nameFilter(shrinkNode)); - ensureStableCluster(nodeCount -1); + ensureStableCluster(nodeCount - 1); // demonstrate that the index.routing.allocation.initial_recovery setting from the shrink doesn't carry over into the split index, // because this would cause the shrink to fail as the initial_recovery node is no longer present.