You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/07/19 22:38:45 UTC
[GitHub] [pulsar] dlg99 commented on a diff in pull request #16664: [fix][broker] PulsarLedgerManager to pass correct error code to BK client
dlg99 commented on code in PR #16664:
URL: https://github.com/apache/pulsar/pull/16664#discussion_r925010868
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerBkEnsemblesTests.java:
##########
@@ -279,6 +286,147 @@ public void testSkipCorruptDataLedger() throws Exception {
consumer.close();
}
+ @Test
+ public void testTruncateCorruptDataLedger() throws Exception {
+ // Ensure intended state for autoSkipNonRecoverableData
+ admin.brokers().updateDynamicConfiguration("autoSkipNonRecoverableData", "false");
+
+ @Cleanup
+ PulsarClient client = PulsarClient.builder()
+ .serviceUrl(pulsar.getWebServiceAddress())
+ .statsInterval(0, TimeUnit.SECONDS)
+ .build();
+
+ final int totalMessages = 100;
+ final int totalDataLedgers = 5;
+ final int entriesPerLedger = totalMessages / totalDataLedgers;
+
+ final String tenant = "prop";
+ try {
+ admin.tenants().createTenant(tenant, new TenantInfoImpl(Sets.newHashSet("role1", "role2"),
+ Sets.newHashSet(config.getClusterName())));
+ } catch (Exception e) {
Review Comment:
AFAICT these could be created by other test cases; following the same pattern as in other test cases here
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org