@@ -390,6 +390,7 @@ public void testFromJson() throws IOException {
390390 assertEquals (json , 40.01 , parsed .bottomRight ().getLat (), 0.0001 );
391391 assertEquals (json , 1.0 , parsed .boost (), 0.0001 );
392392 assertEquals (json , GeoExecType .MEMORY , parsed .type ());
393+ assertDeprecationWarning ();
393394 }
394395
395396 public void testFromWKT () throws IOException {
@@ -434,6 +435,7 @@ public void testFromWKT() throws IOException {
434435 assertEquals (expectedJson , 40.01 , parsed .bottomRight ().getLat (), delta );
435436 assertEquals (expectedJson , 1.0 , parsed .boost (), delta );
436437 assertEquals (expectedJson , GeoExecType .MEMORY , parsed .type ());
438+ assertDeprecationWarning ();
437439 }
438440
439441 public void testFromGeohash () throws IOException {
@@ -473,6 +475,7 @@ public void testFromGeohash() throws IOException {
473475 assertEquals (json , 33.75 , parsed .bottomRight ().getLat (), 0.0001 );
474476 assertEquals (json , 1.0 , parsed .boost (), 0.0001 );
475477 assertEquals (json , GeoExecType .MEMORY , parsed .type ());
478+ assertDeprecationWarning ();
476479 }
477480
478481 public void testMalformedGeohashes () {
@@ -531,4 +534,26 @@ public void testIgnoreUnmapped() throws IOException {
531534 QueryShardException e = expectThrows (QueryShardException .class , () -> failingQueryBuilder .toQuery (searchExecutionContext ));
532535 assertThat (e .getMessage (), containsString ("failed to find geo field [unmapped]" ));
533536 }
537+
538+ @ Override
539+ public void testValidOutput () throws IOException {
540+ super .testValidOutput ();
541+ assertDeprecationWarning ();
542+ }
543+
544+ @ Override
545+ public void testUnknownField () throws IOException {
546+ super .testUnknownField ();
547+ assertDeprecationWarning ();
548+ }
549+
550+ @ Override
551+ public void testFromXContent () throws IOException {
552+ super .testFromXContent ();
553+ assertDeprecationWarning ();
554+ }
555+
556+ private void assertDeprecationWarning () {
557+ assertWarnings ("Deprecated field [type] used, this field is unused and will be removed entirely" );
558+ }
534559}
0 commit comments