3737import static org .hamcrest .Matchers .anyOf ;
3838import static org .hamcrest .Matchers .containsString ;
3939import static org .hamcrest .Matchers .equalTo ;
40- import static org .hamcrest .Matchers .not ;
4140
4241public class DatafeedJobsRestIT extends ESRestTestCase {
4342
@@ -503,12 +502,12 @@ public void testLookbackWithIndicesOptions() throws Exception {
503502 }""" );
504503 client ().performRequest (createJobRequest );
505504 String datafeedId = jobId + "-datafeed" ;
506- new DatafeedBuilder (datafeedId , jobId , "* hidden-*" ).setIndicesOptions ("""
505+ new DatafeedBuilder (datafeedId , jobId , "hidden-*" ).setIndicesOptions ("""
507506 {"expand_wildcards": ["all"],"allow_no_indices": true}""" ).build ();
508507
509508 StringBuilder bulk = new StringBuilder ();
510509
511- Request createGeoData = new Request ("PUT" , "/. hidden-index" );
510+ Request createGeoData = new Request ("PUT" , "/hidden-index" );
512511 createGeoData .setJsonEntity ("""
513512 {
514513 "mappings": {
@@ -528,23 +527,23 @@ public void testLookbackWithIndicesOptions() throws Exception {
528527 client ().performRequest (createGeoData );
529528
530529 bulk .append ("""
531- {"index": {"_index": ". hidden-index", "_id": 1}}
530+ {"index": {"_index": "hidden-index", "_id": 1}}
532531 {"time":"2016-06-01T00:00:00Z","value": 1000}
533- {"index": {"_index": ". hidden-index", "_id": 2}}
532+ {"index": {"_index": "hidden-index", "_id": 2}}
534533 {"time":"2016-06-01T00:05:00Z","value":1500}
535- {"index": {"_index": ". hidden-index", "_id": 3}}
534+ {"index": {"_index": "hidden-index", "_id": 3}}
536535 {"time":"2016-06-01T00:10:00Z","value":1600}
537- {"index": {"_index": ". hidden-index", "_id": 4}}
536+ {"index": {"_index": "hidden-index", "_id": 4}}
538537 {"time":"2016-06-01T00:15:00Z","value":100}
539- {"index": {"_index": ". hidden-index", "_id": 5}}
538+ {"index": {"_index": "hidden-index", "_id": 5}}
540539 {"time":"2016-06-01T00:20:00Z","value":1}
541- {"index": {"_index": ". hidden-index", "_id": 6}}
540+ {"index": {"_index": "hidden-index", "_id": 6}}
542541 {"time":"2016-06-01T00:25:00Z","value":1500}
543- {"index": {"_index": ". hidden-index", "_id": 7}}
542+ {"index": {"_index": "hidden-index", "_id": 7}}
544543 {"time":"2016-06-01T00:30:00Z","value":1500}
545- {"index": {"_index": ". hidden-index", "_id": 8}}
544+ {"index": {"_index": "hidden-index", "_id": 8}}
546545 {"time":"2016-06-01T00:40:00Z","value":2100}
547- {"index": {"_index": ". hidden-index", "_id": 9}}
546+ {"index": {"_index": "hidden-index", "_id": 9}}
548547 {"time":"2016-06-01T00:41:00Z","value":0}
549548 """ );
550549 bulkIndex (bulk .toString ());
@@ -1802,7 +1801,7 @@ private void bulkIndex(String bulk) throws IOException {
18021801 bulkRequest .addParameter ("refresh" , "true" );
18031802 bulkRequest .addParameter ("pretty" , null );
18041803 String bulkResponse = EntityUtils .toString (client ().performRequest (bulkRequest ).getEntity ());
1805- assertThat (bulkResponse , not ( containsString ("\" errors\" : false" ) ));
1804+ assertThat (bulkResponse , containsString ("\" errors\" : false" ));
18061805 }
18071806
18081807 private Response createJobAndDataFeed (String jobId , String datafeedId ) throws IOException {
0 commit comments