liangyepianzhou commented on code in PR #17449:
URL: https://github.com/apache/pulsar/pull/17449#discussion_r1010175401
##########
pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleSchemaTest.java:
##########
@@ -1216,6 +1216,52 @@ public void testAutoCreatedSchema(String domain) throws
Exception {
Assert.assertEquals(admin.schemas().getSchemaInfo(topic2).getType(),
SchemaType.STRING);
}
+ @Test(dataProvider = "topicDomain")
+ public void testSubscribeWithSchemaAfterAutoConsumeNewTopic(String domain)
throws Exception {
+ final String topic = domain +
"my-property/my-ns/testSubscribeWithSchemaAfterAutoConsume-1";
+
+ Consumer autoConsumer1 =
pulsarClient.newConsumer(Schema.AUTO_CONSUME())
Review Comment:
```suggestion
Consumer<GenericRecord> autoConsumer1 =
pulsarClient.newConsumer(Schema.AUTO_CONSUME())
```
##########
pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleSchemaTest.java:
##########
@@ -1216,6 +1216,52 @@ public void testAutoCreatedSchema(String domain) throws
Exception {
Assert.assertEquals(admin.schemas().getSchemaInfo(topic2).getType(),
SchemaType.STRING);
}
+ @Test(dataProvider = "topicDomain")
+ public void testSubscribeWithSchemaAfterAutoConsumeNewTopic(String domain)
throws Exception {
+ final String topic = domain +
"my-property/my-ns/testSubscribeWithSchemaAfterAutoConsume-1";
+
+ Consumer autoConsumer1 =
pulsarClient.newConsumer(Schema.AUTO_CONSUME())
+ .topic(topic)
+ .subscriptionType(SubscriptionType.Shared)
+ .subscriptionName("sub0")
+ .consumerName("autoConsumer1")
+ .subscribe();
+
+ Consumer autoConsumer2 =
pulsarClient.newConsumer(Schema.AUTO_CONSUME())
Review Comment:
```suggestion
Consumer<GenericRecord> autoConsumer2 =
pulsarClient.newConsumer(Schema.AUTO_CONSUME())
```
--
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]