Skip to content

Commit

Permalink
Use doc instead of _doc in FullClusterRestartIT
Browse files Browse the repository at this point in the history
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 elastic#42581
  • Loading branch information
dnhatn committed May 28, 2019
1 parent 4123ade commit ab832c4
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,6 @@ public void testSoftDeletes() throws Exception {
* 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()
Expand All @@ -1043,7 +1042,7 @@ public void testClosedIndices() throws Exception {
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()) {
Expand Down

0 comments on commit ab832c4

Please sign in to comment.