Skip to content

Commit 09e86ef

Browse files
committed
Remove type from DeleteExpiredDataIT
1 parent e7519ab commit 09e86ef

File tree

1 file changed

+3
-3
lines changed
  • x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration

1 file changed

+3
-3
lines changed

x-pack/plugin/ml/qa/native-multi-node-tests/src/test/java/org/elasticsearch/xpack/ml/integration/DeleteExpiredDataIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
public class DeleteExpiredDataIT extends MlNativeAutodetectIntegTestCase {
5050

5151
private static final String DATA_INDEX = "delete-expired-data-test-data";
52-
private static final String DATA_TYPE = "doc";
52+
private static final String DATA_TYPE = "_doc";
5353

5454
@Before
5555
public void setUpData() throws IOException {
@@ -68,7 +68,7 @@ public void setUpData() throws IOException {
6868
long timestamp = nowMillis - TimeValue.timeValueHours(totalBuckets - bucket).getMillis();
6969
int bucketRate = bucket == anomalousBucket ? anomalousRate : normalRate;
7070
for (int point = 0; point < bucketRate; point++) {
71-
IndexRequest indexRequest = new IndexRequest(DATA_INDEX, DATA_TYPE);
71+
IndexRequest indexRequest = new IndexRequest(DATA_INDEX);
7272
indexRequest.source("time", timestamp);
7373
bulkRequestBuilder.add(indexRequest);
7474
}
@@ -97,7 +97,7 @@ public void testDeleteExpiredData() throws Exception {
9797
bulkRequestBuilder.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
9898
for (int i = 0; i < 10010; i++) {
9999
String docId = "non_existing_job_" + randomFrom("model_state_1234567#" + i, "quantiles", "categorizer_state#" + i);
100-
IndexRequest indexRequest = new IndexRequest(AnomalyDetectorsIndex.jobStateIndexWriteAlias(), "doc", docId);
100+
IndexRequest indexRequest = new IndexRequest(AnomalyDetectorsIndex.jobStateIndexWriteAlias()).id(docId);
101101
indexRequest.source(Collections.emptyMap());
102102
bulkRequestBuilder.add(indexRequest);
103103
}

0 commit comments

Comments
 (0)