Skip to content

Commit d01d123

Browse files
committed
Fix failing cases in IndexingIT.
1 parent e4e1688 commit d01d123

File tree

2 files changed

+6
-6
lines changed
  • qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades
  • x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades

2 files changed

+6
-6
lines changed

qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/IndexingIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ public void testIndexing() throws IOException {
129129

130130
if (CLUSTER_TYPE != ClusterType.OLD) {
131131
bulk("test_index", "_" + CLUSTER_TYPE, 5);
132-
Request toBeDeleted = new Request("PUT", "/test_index/doc/to_be_deleted");
132+
Request toBeDeleted = new Request("PUT", "/test_index/_doc/to_be_deleted");
133133
toBeDeleted.addParameter("refresh", "true");
134134
toBeDeleted.setJsonEntity("{\"f1\": \"delete-me\"}");
135135
client().performRequest(toBeDeleted);
136136
assertCount("test_index", expectedCount + 6);
137137

138-
Request delete = new Request("DELETE", "/test_index/doc/to_be_deleted");
138+
Request delete = new Request("DELETE", "/test_index/_doc/to_be_deleted");
139139
delete.addParameter("refresh", "true");
140140
client().performRequest(delete);
141141

@@ -146,7 +146,7 @@ public void testIndexing() throws IOException {
146146
private void bulk(String index, String valueSuffix, int count) throws IOException {
147147
StringBuilder b = new StringBuilder();
148148
for (int i = 0; i < count; i++) {
149-
b.append("{\"index\": {\"_index\": \"").append(index).append("\", \"_type\": \"doc\"}}\n");
149+
b.append("{\"index\": {\"_index\": \"").append(index).append("\", \"_type\": \"_doc\"}}\n");
150150
b.append("{\"f1\": \"v").append(i).append(valueSuffix).append("\", \"f2\": ").append(i).append("}\n");
151151
}
152152
Request bulk = new Request("POST", "/_bulk");

x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/IndexingIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ public void testIndexing() throws IOException {
114114

115115
if (CLUSTER_TYPE != ClusterType.OLD) {
116116
bulk("test_index", "_" + CLUSTER_TYPE, 5);
117-
Request toBeDeleted = new Request("PUT", "/test_index/doc/to_be_deleted");
117+
Request toBeDeleted = new Request("PUT", "/test_index/_doc/to_be_deleted");
118118
toBeDeleted.addParameter("refresh", "true");
119119
toBeDeleted.setJsonEntity("{\"f1\": \"delete-me\"}");
120120
client().performRequest(toBeDeleted);
121121
assertCount("test_index", expectedCount + 6);
122122

123-
Request delete = new Request("DELETE", "/test_index/doc/to_be_deleted");
123+
Request delete = new Request("DELETE", "/test_index/_doc/to_be_deleted");
124124
delete.addParameter("refresh", "true");
125125
client().performRequest(delete);
126126

@@ -131,7 +131,7 @@ public void testIndexing() throws IOException {
131131
private void bulk(String index, String valueSuffix, int count) throws IOException {
132132
StringBuilder b = new StringBuilder();
133133
for (int i = 0; i < count; i++) {
134-
b.append("{\"index\": {\"_index\": \"").append(index).append("\", \"_type\": \"doc\"}}\n");
134+
b.append("{\"index\": {\"_index\": \"").append(index).append("\", \"_type\": \"_doc\"}}\n");
135135
b.append("{\"f1\": \"v").append(i).append(valueSuffix).append("\", \"f2\": ").append(i).append("}\n");
136136
}
137137
Request bulk = new Request("POST", "/_bulk");

0 commit comments

Comments
 (0)