michaeljmarshall commented on a change in pull request #14508:
URL: https://github.com/apache/pulsar/pull/14508#discussion_r816960837



##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java
##########
@@ -708,7 +709,7 @@ public void testNullKeyValueProperty() throws 
PulsarAdminException, PulsarClient
         map.put(null, "value"); // null key is not allowed for JSON, it's only 
for test here
 
         // leave INT32 instance unchanged
-        final Schema<Integer> integerSchema = Schema.INT32.clone();
+        final Schema<Integer> integerSchema = 
DefaultImplementation.getDefaultImplementation().newIntSchema();

Review comment:
       I don't believe this solution works. `SCHEMA_INFO` is static, so any 
modification of it in one test will affect other tests. This is a design flaw.
   
   A larger question for me is why we're letting users modify the `SCHEMA_INFO` 
object. It is static, so cloning isn't going to do anything.




-- 
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