From ab832c4f17d198627354c80f4581f4bb53be95a0 Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Mon, 27 May 2019 20:38:58 -0400 Subject: [PATCH] Use doc instead of _doc in FullClusterRestartIT ES does not accept doc type starting with underscore until 6.2.0. We have to use "doc" instead of "_doc" in FullClusterRestartIT if we are upgrading from a 6.2.0- cluster. Closes #42581 --- .../java/org/elasticsearch/upgrades/FullClusterRestartIT.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java b/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java index 7ea5e0cdb35..88389d97c89 100644 --- a/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java +++ b/qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java @@ -1031,7 +1031,6 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase { * This test creates an index in the old cluster and then closes it. When the cluster is fully restarted in a newer version, * it verifies that the index exists and is replicated if the old version supports replication. */ - @AwaitsFix(bugUrl="https://github.com/elastic/elasticsearch/issues/42581") public void testClosedIndices() throws Exception { if (isRunningAgainstOldCluster()) { createIndex(index, Settings.builder() @@ -1043,7 +1042,7 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase { if (randomBoolean()) { numDocs = between(1, 100); for (int i = 0; i < numDocs; i++) { - final Request request = new Request("POST", "/" + index + "/_doc/" + i); + final Request request = new Request("POST", "/" + index + "/" + type + "/" + i); request.setJsonEntity(Strings.toString(JsonXContent.contentBuilder().startObject().field("field", "v1").endObject())); assertOK(client().performRequest(request)); if (rarely()) {