@@ -451,7 +451,7 @@ public void testCanMatchFilteringOnCoordinatorThatCanBeSkipped() throws Exceptio
451
451
List <Index > regularIndices =
452
452
randomList (0 , 2 , () -> new Index (randomAlphaOfLength (10 ), UUIDs .base64UUID ()));
453
453
454
- long indexMinTimestamp = randomLongBetween (0 , 5000 );
454
+ long indexMinTimestamp = randomLongBetween (1000 , 5000 );
455
455
long indexMaxTimestamp = randomLongBetween (indexMinTimestamp , 5000 * 2 );
456
456
StaticCoordinatorRewriteContextProviderBuilder contextProviderBuilder = new StaticCoordinatorRewriteContextProviderBuilder ();
457
457
String timestampFieldName = dataStream .getTimeStampField ().getName ();
@@ -463,7 +463,8 @@ public void testCanMatchFilteringOnCoordinatorThatCanBeSkipped() throws Exceptio
463
463
// We query a range outside of the timestamp range covered by both datastream indices
464
464
rangeQueryBuilder
465
465
.from (indexMaxTimestamp + 1 )
466
- .to (indexMaxTimestamp + 2 );
466
+ .to (indexMaxTimestamp + 2 )
467
+ .format ("epoch_millis" );
467
468
468
469
BoolQueryBuilder queryBuilder = new BoolQueryBuilder ()
469
470
.filter (rangeQueryBuilder );
@@ -519,7 +520,7 @@ public void testCanMatchFilteringOnCoordinatorParsingFails() throws Exception {
519
520
List <Index > regularIndices =
520
521
randomList (0 , 2 , () -> new Index (randomAlphaOfLength (10 ), UUIDs .base64UUID ()));
521
522
522
- long indexMinTimestamp = randomLongBetween (0 , 5000 );
523
+ long indexMinTimestamp = randomLongBetween (1000 , 5000 );
523
524
long indexMaxTimestamp = randomLongBetween (indexMinTimestamp , 5000 * 2 );
524
525
StaticCoordinatorRewriteContextProviderBuilder contextProviderBuilder = new StaticCoordinatorRewriteContextProviderBuilder ();
525
526
String timestampFieldName = dataStream .getTimeStampField ().getName ();
@@ -577,7 +578,8 @@ public void testCanMatchFilteringOnCoordinatorThatCanNotBeSkipped() throws Excep
577
578
// We query a range within the timestamp range covered by both datastream indices
578
579
rangeQueryBuilder
579
580
.from (indexMinTimestamp )
580
- .to (indexMaxTimestamp );
581
+ .to (indexMaxTimestamp )
582
+ .format ("epoch_millis" );
581
583
582
584
queryBuilder .filter (rangeQueryBuilder );
583
585
@@ -590,7 +592,8 @@ public void testCanMatchFilteringOnCoordinatorThatCanNotBeSkipped() throws Excep
590
592
// We query a range outside of the timestamp range covered by both datastream indices
591
593
RangeQueryBuilder rangeQueryBuilder = new RangeQueryBuilder (timestampFieldName )
592
594
.from (indexMaxTimestamp + 1 )
593
- .to (indexMaxTimestamp + 2 );
595
+ .to (indexMaxTimestamp + 2 )
596
+ .format ("epoch_millis" );
594
597
595
598
TermQueryBuilder termQueryBuilder = new TermQueryBuilder ("fake" , "value" );
596
599
0 commit comments