[TEST] Set data_description in MlTransportClientIT

Original commit: elastic/x-pack-elasticsearch@0d392d26d8
This commit is contained in:
Dimitrios Athanasiou 2017-05-12 18:51:38 +01:00
parent 0ac38b05e4
commit 7293bcdc1c
1 changed files with 3 additions and 2 deletions

View File

@ -6,17 +6,16 @@
package org.elasticsearch.xpack.ml.client;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.xpack.XPackClient;
import org.elasticsearch.xpack.ml.action.DeleteJobAction;
import org.elasticsearch.xpack.ml.action.GetJobsAction;
import org.elasticsearch.xpack.ml.action.PutJobAction;
import org.elasticsearch.xpack.ml.job.config.AnalysisConfig;
import org.elasticsearch.xpack.ml.job.config.DataDescription;
import org.elasticsearch.xpack.ml.job.config.Detector;
import org.elasticsearch.xpack.ml.job.config.Job;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import static org.hamcrest.Matchers.equalTo;
@ -39,6 +38,8 @@ public class MLTransportClientIT extends ESXPackSmokeClientTestCase {
AnalysisConfig.Builder analysisConfig = new AnalysisConfig.Builder(detectors);
job.setAnalysisConfig(analysisConfig);
job.setDataDescription(new DataDescription.Builder());
PutJobAction.Response putJobResponse = mlClient
.putJob(new PutJobAction.Request(job))
.actionGet();