@@ -1422,39 +1422,6 @@ public void testSchemaNormalization() throws Exception {
14221422 assertTrue (!messages .isEmpty () && messages .get (0 ).contains ("Invalid schema" ));
14231423 }
14241424
1425- @ Test
1426- public void testLookUpSchemaWithNormalizationRetry () throws Exception {
1427- String subject = "testSubject" ;
1428-
1429- String schemaString1 = "{\" type\" :\" record\" ,\" name\" :\" User\" ,\" fields\" :[{\" name\" :\" id\" ,\" type\" :\" int\" },{\" name\" :\" email4\" ,\" type\" :\" string\" }]}" ;
1430-
1431- // Register the original schema
1432- TestUtils .registerAndVerifySchema (restApp .restClient , schemaString1 , 1 , subject );
1433-
1434- // Same schema with different field ordering (semantically equivalent)
1435- String schemaString2 = "{\" type\" :\" record\" ,\" name\" :\" User\" ,\" fields\" :[{\" type\" :\" int\" ,\" name\" :\" id\" },{\" type\" :\" string\" ,\" name\" :\" email4\" }]}" ;
1436-
1437- RegisterSchemaRequest request = new RegisterSchemaRequest ();
1438- request .setSchema (schemaString2 );
1439-
1440- io .confluent .kafka .schemaregistry .client .rest .entities .Schema schema =
1441- restApp .restClient .lookUpSubjectVersion (request , subject , false , false );
1442- assertNotNull (schema );
1443- assertEquals (1 , schema .getVersion ().intValue ());
1444-
1445- // Different schema with different field name (not semantically equivalent)
1446- String invalidSchema = "{\" type\" :\" record\" ,\" name\" :\" User\" ,\" fields\" :[{\" type\" :\" int\" ,\" name\" :\" id\" },{\" type\" :\" string\" ,\" name\" :\" email6\" }]}" ;
1447- request .setSchema (invalidSchema );
1448-
1449- // Should fail since schemas are actually different
1450- try {
1451- restApp .restClient .lookUpSubjectVersion (request , subject , true , false );
1452- fail ("Should fail as schemas are not semantically equivalent" );
1453- } catch (RestClientException e ) {
1454- assertEquals (Errors .SCHEMA_NOT_FOUND_ERROR_CODE , e .getErrorCode ());
1455- }
1456- }
1457-
14581425 @ Test
14591426 public void testBad () throws Exception {
14601427 String subject1 = "testTopic1" ;
0 commit comments