gaoran10 commented on a change in pull request #10573:
URL: https://github.com/apache/pulsar/pull/10573#discussion_r631937227



##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/schema/SchemaTest.java
##########
@@ -556,4 +558,39 @@ public void testDeleteTopicAndSchema() throws Exception {
             }
         }
     }
+
+    @Test
+    public void testProducerMultipleSchemaMessages() throws Exception {
+        final String tenant = PUBLIC_TENANT;
+        final String namespace = "test-namespace-" + randomName(16);
+        final String topicName = "auto_schema_test";
+
+        String ns = tenant + "/" + namespace;
+        admin.namespaces().createNamespace(ns, Sets.newHashSet(CLUSTER_NAME));
+        admin.namespaces().setSchemaCompatibilityStrategy(ns, 
SchemaCompatibilityStrategy.ALWAYS_COMPATIBLE);
+
+        final String topic = TopicName.get(TopicDomain.persistent.value(), 
tenant, namespace, topicName).toString();
+        @Cleanup
+        Producer<byte[]> producer = 
pulsarClient.newProducer(Schema.AUTO_PRODUCE_BYTES())

Review comment:
       Use the AutoProduceBytesSchema in ALWAYS_COMPATIBLE mode, if the message 
schema is not in the schema cache of the producer, it could be uploaded to the 
broker and save in schema storage, and all the schemas could be queried. This 
could verify the schema cache work well or not.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to