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