Skip to content

Commit

Permalink
Remove type from DeleteExpiredDataIT
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkyle committed Mar 2, 2019
1 parent 44b7e9b commit 2726736
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
public class DeleteExpiredDataIT extends MlNativeAutodetectIntegTestCase {

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

@Before
public void setUpData() throws IOException {
Expand All @@ -68,7 +68,7 @@ public void setUpData() throws IOException {
long timestamp = nowMillis - TimeValue.timeValueHours(totalBuckets - bucket).getMillis();
int bucketRate = bucket == anomalousBucket ? anomalousRate : normalRate;
for (int point = 0; point < bucketRate; point++) {
IndexRequest indexRequest = new IndexRequest(DATA_INDEX, DATA_TYPE);
IndexRequest indexRequest = new IndexRequest(DATA_INDEX);
indexRequest.source("time", timestamp);
bulkRequestBuilder.add(indexRequest);
}
Expand Down Expand Up @@ -97,7 +97,7 @@ public void testDeleteExpiredData() throws Exception {
bulkRequestBuilder.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
for (int i = 0; i < 10010; i++) {
String docId = "non_existing_job_" + randomFrom("model_state_1234567#" + i, "quantiles", "categorizer_state#" + i);
IndexRequest indexRequest = new IndexRequest(AnomalyDetectorsIndex.jobStateIndexWriteAlias(), "doc", docId);
IndexRequest indexRequest = new IndexRequest(AnomalyDetectorsIndex.jobStateIndexWriteAlias()).id(docId);
indexRequest.source(Collections.emptyMap());
bulkRequestBuilder.add(indexRequest);
}
Expand Down

0 comments on commit 2726736

Please sign in to comment.