@@ -396,6 +396,7 @@ public void testFromJson() throws IOException {
396
396
assertEquals (json , 40.01 , parsed .bottomRight ().getLat (), 0.0001 );
397
397
assertEquals (json , 1.0 , parsed .boost (), 0.0001 );
398
398
assertEquals (json , GeoExecType .MEMORY , parsed .type ());
399
+ assertDeprecationWarning ();
399
400
}
400
401
401
402
public void testFromWKT () throws IOException {
@@ -440,6 +441,7 @@ public void testFromWKT() throws IOException {
440
441
assertEquals (expectedJson , 40.01 , parsed .bottomRight ().getLat (), delta );
441
442
assertEquals (expectedJson , 1.0 , parsed .boost (), delta );
442
443
assertEquals (expectedJson , GeoExecType .MEMORY , parsed .type ());
444
+ assertDeprecationWarning ();
443
445
}
444
446
445
447
public void testFromGeohash () throws IOException {
@@ -479,6 +481,7 @@ public void testFromGeohash() throws IOException {
479
481
assertEquals (json , 33.75 , parsed .bottomRight ().getLat (), 0.0001 );
480
482
assertEquals (json , 1.0 , parsed .boost (), 0.0001 );
481
483
assertEquals (json , GeoExecType .MEMORY , parsed .type ());
484
+ assertDeprecationWarning ();
482
485
}
483
486
484
487
public void testMalformedGeohashes () {
@@ -537,4 +540,26 @@ public void testIgnoreUnmapped() throws IOException {
537
540
QueryShardException e = expectThrows (QueryShardException .class , () -> failingQueryBuilder .toQuery (searchExecutionContext ));
538
541
assertThat (e .getMessage (), containsString ("failed to find geo field [unmapped]" ));
539
542
}
543
+
544
+ @ Override
545
+ public void testValidOutput () throws IOException {
546
+ super .testValidOutput ();
547
+ assertDeprecationWarning ();
548
+ }
549
+
550
+ @ Override
551
+ public void testUnknownField () throws IOException {
552
+ super .testUnknownField ();
553
+ assertDeprecationWarning ();
554
+ }
555
+
556
+ @ Override
557
+ public void testFromXContent () throws IOException {
558
+ super .testFromXContent ();
559
+ assertDeprecationWarning ();
560
+ }
561
+
562
+ private void assertDeprecationWarning () {
563
+ assertWarnings ("Deprecated field [type] used, this field is unused and will be removed entirely" );
564
+ }
540
565
}
0 commit comments