codelipenghui commented on code in PR #17283:
URL: https://github.com/apache/pulsar/pull/17283#discussion_r970925823
##########
pulsar-broker/src/test/java/org/apache/pulsar/schema/compatibility/SchemaCompatibilityCheckTest.java:
##########
@@ -478,7 +483,56 @@ public void
testProducerSendWithOldSchemaAndConsumerCanRead(SchemaCompatibilityS
consumerOne.close();
producerOne.close();
+ }
+ @Test
+ public void testSchemaLedgerAutoRelease() throws Exception {
+ String namespaceName = PUBLIC_TENANT + "/default";
+ String topicName = "persistent://" + namespaceName + "/tp";
+ admin.namespaces().createNamespace(namespaceName,
Sets.newHashSet(CLUSTER_NAME));
+ admin.namespaces().setSchemaCompatibilityStrategy(namespaceName,
SchemaCompatibilityStrategy.ALWAYS_COMPATIBLE);
+ ClassLoader classLoader =
Thread.currentThread().getContextClassLoader();
+ // Update schema 100 times.
+ ArrayList<Class> classes = createManyClass(classLoader, 100);
Review Comment:
I think using the SchemaDefinitionBuilder is easier to create multiple
schemas.
--
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]