Skip to content

Commit 87674fa

Browse files
nikhil-ctdssrinath-ctds
authored andcommitted
Fix cherry-pick issue
1 parent 394b674 commit 87674fa

File tree

1 file changed

+0
-60
lines changed

1 file changed

+0
-60
lines changed

pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,41 +1664,6 @@ public void testDynamicConfigurationsForceDeleteTenantAllowed() throws Exception
16641664
});
16651665
}
16661666

1667-
@Test
1668-
public void testIsSystemTopicAllowAutoTopicCreationAsync() throws Exception {
1669-
BrokerService brokerService = pulsar.getBrokerService();
1670-
assertFalse(brokerService.isAllowAutoTopicCreationAsync(
1671-
ServiceUnitStateChannelImpl.TOPIC).get());
1672-
assertTrue(brokerService.isAllowAutoTopicCreationAsync(
1673-
"persistent://pulsar/system/my-system-topic").get());
1674-
}
1675-
1676-
@Test
1677-
public void testDuplicateAcknowledgement() throws Exception {
1678-
final String ns = "prop/ns-test";
1679-
1680-
admin.namespaces().createNamespace(ns, 2);
1681-
final String topicName = "persistent://prop/ns-test/duplicated-acknowledgement-test";
1682-
@Cleanup
1683-
Producer<byte[]> producer = pulsarClient.newProducer()
1684-
.topic(topicName)
1685-
.create();
1686-
@Cleanup
1687-
Consumer<byte[]> consumer1 = pulsarClient.newConsumer()
1688-
.topic(topicName)
1689-
.subscriptionName("sub-1")
1690-
.acknowledgmentGroupTime(0, TimeUnit.SECONDS)
1691-
.subscriptionType(SubscriptionType.Shared)
1692-
.isAckReceiptEnabled(true)
1693-
.subscribe();
1694-
producer.send("1".getBytes(StandardCharsets.UTF_8));
1695-
Message<byte[]> message = consumer1.receive();
1696-
consumer1.acknowledge(message);
1697-
consumer1.acknowledge(message);
1698-
assertEquals(admin.topics().getStats(topicName).getSubscriptions()
1699-
.get("sub-1").getUnackedMessages(), 0);
1700-
}
1701-
17021667
@Test
17031668
public void testBlockedConsumerOnUnackedMsgs() throws Exception {
17041669
final String ns = "prop/ns-test";
@@ -1740,31 +1705,6 @@ public void testBlockedConsumerOnUnackedMsgs() throws Exception {
17401705
assertFalse(subscriptionStats.getConsumers().get(0).isBlockedConsumerOnUnackedMsgs());
17411706
}
17421707

1743-
@Test
1744-
public void testUnsubscribeNonDurableSub() throws Exception {
1745-
final String ns = "prop/ns-test";
1746-
final String topic = ns + "/testUnsubscribeNonDurableSub";
1747-
1748-
admin.namespaces().createNamespace(ns, 2);
1749-
admin.topics().createPartitionedTopic(String.format("persistent://%s", topic), 1);
1750-
1751-
pulsarClient.newProducer(Schema.STRING).topic(topic).create().close();
1752-
@Cleanup
1753-
Consumer<String> consumer = pulsarClient
1754-
.newConsumer(Schema.STRING)
1755-
.topic(topic)
1756-
.subscriptionMode(SubscriptionMode.NonDurable)
1757-
.subscriptionInitialPosition(SubscriptionInitialPosition.Earliest)
1758-
.subscriptionName("sub1")
1759-
.subscriptionType(SubscriptionType.Shared)
1760-
.subscribe();
1761-
try {
1762-
consumer.unsubscribe();
1763-
} catch (Exception ex) {
1764-
fail("Unsubscribe failed");
1765-
}
1766-
}
1767-
17681708
// this test is disabled since it is flaky
17691709
@Test(enabled = false)
17701710
public void testMetricsPersistentTopicLoadFails() throws Exception {

0 commit comments

Comments
 (0)