@@ -451,7 +451,7 @@ public void testCanMatchFilteringOnCoordinatorThatCanBeSkipped() throws Exceptio
451451 List <Index > regularIndices =
452452 randomList (0 , 2 , () -> new Index (randomAlphaOfLength (10 ), UUIDs .base64UUID ()));
453453
454- long indexMinTimestamp = randomLongBetween (0 , 5000 );
454+ long indexMinTimestamp = randomLongBetween (1000 , 5000 );
455455 long indexMaxTimestamp = randomLongBetween (indexMinTimestamp , 5000 * 2 );
456456 StaticCoordinatorRewriteContextProviderBuilder contextProviderBuilder = new StaticCoordinatorRewriteContextProviderBuilder ();
457457 String timestampFieldName = dataStream .getTimeStampField ().getName ();
@@ -463,7 +463,8 @@ public void testCanMatchFilteringOnCoordinatorThatCanBeSkipped() throws Exceptio
463463 // We query a range outside of the timestamp range covered by both datastream indices
464464 rangeQueryBuilder
465465 .from (indexMaxTimestamp + 1 )
466- .to (indexMaxTimestamp + 2 );
466+ .to (indexMaxTimestamp + 2 )
467+ .format ("epoch_millis" );
467468
468469 BoolQueryBuilder queryBuilder = new BoolQueryBuilder ()
469470 .filter (rangeQueryBuilder );
@@ -519,7 +520,7 @@ public void testCanMatchFilteringOnCoordinatorParsingFails() throws Exception {
519520 List <Index > regularIndices =
520521 randomList (0 , 2 , () -> new Index (randomAlphaOfLength (10 ), UUIDs .base64UUID ()));
521522
522- long indexMinTimestamp = randomLongBetween (0 , 5000 );
523+ long indexMinTimestamp = randomLongBetween (1000 , 5000 );
523524 long indexMaxTimestamp = randomLongBetween (indexMinTimestamp , 5000 * 2 );
524525 StaticCoordinatorRewriteContextProviderBuilder contextProviderBuilder = new StaticCoordinatorRewriteContextProviderBuilder ();
525526 String timestampFieldName = dataStream .getTimeStampField ().getName ();
@@ -577,7 +578,8 @@ public void testCanMatchFilteringOnCoordinatorThatCanNotBeSkipped() throws Excep
577578 // We query a range within the timestamp range covered by both datastream indices
578579 rangeQueryBuilder
579580 .from (indexMinTimestamp )
580- .to (indexMaxTimestamp );
581+ .to (indexMaxTimestamp )
582+ .format ("epoch_millis" );
581583
582584 queryBuilder .filter (rangeQueryBuilder );
583585
@@ -590,7 +592,8 @@ public void testCanMatchFilteringOnCoordinatorThatCanNotBeSkipped() throws Excep
590592 // We query a range outside of the timestamp range covered by both datastream indices
591593 RangeQueryBuilder rangeQueryBuilder = new RangeQueryBuilder (timestampFieldName )
592594 .from (indexMaxTimestamp + 1 )
593- .to (indexMaxTimestamp + 2 );
595+ .to (indexMaxTimestamp + 2 )
596+ .format ("epoch_millis" );
594597
595598 TermQueryBuilder termQueryBuilder = new TermQueryBuilder ("fake" , "value" );
596599
0 commit comments