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
This commit is contained in:
parent
4123ade2b6
commit
ab832c4f17
|
@ -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,
|
* 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.
|
* 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 {
|
public void testClosedIndices() throws Exception {
|
||||||
if (isRunningAgainstOldCluster()) {
|
if (isRunningAgainstOldCluster()) {
|
||||||
createIndex(index, Settings.builder()
|
createIndex(index, Settings.builder()
|
||||||
|
@ -1043,7 +1042,7 @@ public class FullClusterRestartIT extends AbstractFullClusterRestartTestCase {
|
||||||
if (randomBoolean()) {
|
if (randomBoolean()) {
|
||||||
numDocs = between(1, 100);
|
numDocs = between(1, 100);
|
||||||
for (int i = 0; i < numDocs; i++) {
|
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()));
|
request.setJsonEntity(Strings.toString(JsonXContent.contentBuilder().startObject().field("field", "v1").endObject()));
|
||||||
assertOK(client().performRequest(request));
|
assertOK(client().performRequest(request));
|
||||||
if (rarely()) {
|
if (rarely()) {
|
||||||
|
|
Loading…
Reference in New Issue