mattisonchao commented on code in PR #16205:
URL: https://github.com/apache/pulsar/pull/16205#discussion_r905823708
##########
pulsar-broker/src/test/java/org/apache/pulsar/compaction/CompactionTest.java:
##########
@@ -1678,4 +1689,62 @@ public void testHealthCheckTopicNotCompacted() {
producer1.close();
producer2.close();
}
+
+ @Test(timeOut = 60000)
+ public void testCompactionWithMarker() throws Exception {
+ String namespace = "my-property/use/my-ns";
+ final TopicName dest = TopicName.get(
+ BrokerTestUtil.newUniqueName("persistent://" + namespace +
"/testWriteMarker"));
+ admin.topics().createNonPartitionedTopic(dest.toString());
+ @Cleanup
+ Consumer<byte[]> consumer = pulsarClient.newConsumer()
+ .topic(dest.toString())
+ .subscriptionName("test-compaction-sub")
+ .subscriptionType(SubscriptionType.Exclusive)
+ .readCompacted(true)
+
.subscriptionInitialPosition(SubscriptionInitialPosition.Latest)
+ .subscribe();
+ Producer<byte[]> producer = pulsarClient.newProducer()
Review Comment:
Should we close the producer?
--
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]