nicoloboschi opened a new pull request #12461:
URL: https://github.com/apache/pulsar/pull/12461


   ### Motivation
   
   I see `AdminApiSchemaTest#testSchemaInfoApi` failing in this way:
   
   ```
   2021-10-22T01:01:52,307+0000 [jersey-client-async-executor-5] WARN  
org.apache.pulsar.client.admin.internal.BaseResource - 
[http://localhost:38587/admin/v2/schemas/schematest/test/test-INT32/schema] 
Failed to perform http post request: java.util.concurrent.CompletionException: 
org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector$RetryException: 
Could not complete the operation. Number of retries has been exhausted. Failed 
reason: Null key for a Map not allowed in JSON (use a converting 
NullKeySerializer?) (through reference chain: 
org.apache.pulsar.common.protocol.schema.PostSchemaPayload["properties"]->java.util.HashMap["null"])
   ```
   It only fails with INT32 default shema.
   I found another test (`SchemaTest#testNullKeyValueProperty`) which sets a 
null-key property to INT32 instance; so if it runs before, it makes 
AdminApiSchemaTest#testSchemaInfoApi fails.
   
   ### Modifications
   
   Changed the `SchemaTest#testNullKeyValueProperty` test in order to leaves 
the default INT32 implementation unchanged.
   
   Alternatively, I could made the `properties` fields final, at least for 
defaults `SchemaInfo` but this would result in a breaking change.
   
   
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   ### Documentation
   
   Check the box below and label this PR (if you have committer privilege).
   
   Need to update docs? 
     
   - [x] `no-need-doc` 
     


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to