Skip to content

Commit c5ee1f9

Browse files
Fix tests
1 parent de648c7 commit c5ee1f9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

client/rest-high-level/src/test/java/org/elasticsearch/client/MLRequestConvertersTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public void testGetRecords() throws IOException {
211211
getRecordsRequest.setDescending(true);
212212
getRecordsRequest.setExcludeInterim(true);
213213

214-
Request request = MLRequestConverters.getRecords(getRecordsRequest)
214+
Request request = MLRequestConverters.getRecords(getRecordsRequest);
215215
assertEquals(HttpGet.METHOD_NAME, request.getMethod());
216216
assertEquals("/_xpack/ml/anomaly_detectors/" + jobId + "/results/records", request.getEndpoint());
217217
try (XContentParser parser = createParser(JsonXContent.jsonXContent, request.getEntity().getContent())) {

client/rest-high-level/src/test/java/org/elasticsearch/client/MachineLearningGetResultsIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ public void testGetRecords() throws IOException {
387387
}
388388
}
389389

390-
private static Job buildJob(String jobId) {
390+
public static Job buildJob(String jobId) {
391391
Job.Builder builder = new Job.Builder(jobId);
392392

393393
Detector detector = new Detector.Builder("count", null).build();

client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/MlClientDocumentationIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.elasticsearch.action.index.IndexRequest;
2525
import org.elasticsearch.action.support.WriteRequest;
2626
import org.elasticsearch.client.ESRestHighLevelClientTestCase;
27+
import org.elasticsearch.client.MachineLearningGetResultsIT;
2728
import org.elasticsearch.client.MachineLearningIT;
2829
import org.elasticsearch.client.MlRestTestStateCleaner;
2930
import org.elasticsearch.client.RequestOptions;
@@ -595,8 +596,8 @@ public void testGetOverallBuckets() throws IOException, InterruptedException {
595596

596597
String jobId1 = "test-get-overall-buckets-1";
597598
String jobId2 = "test-get-overall-buckets-2";
598-
Job job1 = MachineLearningIT.buildJob(jobId1);
599-
Job job2 = MachineLearningIT.buildJob(jobId2);
599+
Job job1 = MachineLearningGetResultsIT.buildJob(jobId1);
600+
Job job2 = MachineLearningGetResultsIT.buildJob(jobId2);
600601
client.machineLearning().putJob(new PutJobRequest(job1), RequestOptions.DEFAULT);
601602
client.machineLearning().putJob(new PutJobRequest(job2), RequestOptions.DEFAULT);
602603

@@ -691,7 +692,6 @@ public void onFailure(Exception e) {
691692
}
692693
}
693694

694-
695695
public void testGetRecords() throws IOException, InterruptedException {
696696
RestHighLevelClient client = highLevelClient();
697697

0 commit comments

Comments
 (0)