This is an automated email from the ASF dual-hosted git repository.
mmarshall pushed a commit to branch branch-2.11
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.11 by this push:
new 21c3e3f71dc [fix][test][branch-2.10] Remove testGetTopic method
(#18829)
21c3e3f71dc is described below
commit 21c3e3f71dcae349a910b8f46a300ff08f8742a9
Author: Jiwei Guo <[email protected]>
AuthorDate: Fri Dec 9 15:46:13 2022 +0800
[fix][test][branch-2.10] Remove testGetTopic method (#18829)
Remote test `testGetTopic`, because it was mis cherry-picked by #18181.
The original pr for this test is #17416
(cherry picked from commit fc96e479a7a88298e59dc3c6b4cc98249eded781)
---
.../pulsar/broker/service/BrokerServiceTest.java | 24 ----------------------
1 file changed, 24 deletions(-)
diff --git
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java
index 73f322ec3a3..73fbcb6d6aa 100644
---
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java
+++
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java
@@ -88,7 +88,6 @@ import org.apache.pulsar.client.api.ProducerBuilder;
import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.PulsarClientException;
import org.apache.pulsar.client.api.Schema;
-import org.apache.pulsar.client.api.SubscriptionInitialPosition;
import org.apache.pulsar.client.api.SubscriptionType;
import org.apache.pulsar.client.impl.ClientCnx;
import org.apache.pulsar.client.impl.ConnectionPool;
@@ -99,7 +98,6 @@ import
org.apache.pulsar.common.api.proto.CommandLookupTopicResponse;
import
org.apache.pulsar.common.api.proto.CommandPartitionedTopicMetadataResponse;
import org.apache.pulsar.common.naming.NamespaceBundle;
import org.apache.pulsar.common.naming.NamespaceName;
-import org.apache.pulsar.common.naming.SystemTopicNames;
import org.apache.pulsar.common.naming.TopicName;
import org.apache.pulsar.common.policies.data.BundlesData;
import org.apache.pulsar.common.policies.data.LocalPolicies;
@@ -1477,28 +1475,6 @@ public class BrokerServiceTest extends BrokerTestBase {
assertTrue(brokerService.isSystemTopic(heartbeatNamespaceV2.toString()
+ "/healthcheck"));
}
- @Test
- public void testGetTopic() throws Exception {
- final String ns = "prop/ns-test";
- admin.namespaces().createNamespace(ns, 2);
- final String topicName = ns + "/topic-1";
-
admin.topics().createNonPartitionedTopic(String.format("persistent://%s",
topicName));
- Producer<String> producer1 =
pulsarClient.newProducer(Schema.STRING).topic(topicName).create();
- producer1.close();
- PersistentTopic persistentTopic = (PersistentTopic)
pulsar.getBrokerService().getTopic(topicName.toString(), false).get().get();
- persistentTopic.close().join();
- List<String> topics = new
ArrayList<>(pulsar.getBrokerService().getTopics().keys());
- topics.removeIf(item ->
item.contains(SystemTopicNames.NAMESPACE_EVENTS_LOCAL_NAME));
- Assert.assertEquals(topics.size(), 0);
- @Cleanup
- Consumer<String> consumer = pulsarClient.newConsumer(Schema.STRING)
- .topic(topicName)
- .subscriptionName("sub-1")
-
.subscriptionInitialPosition(SubscriptionInitialPosition.Earliest)
- .subscriptionType(SubscriptionType.Shared)
- .subscribe();
- }
-
@Test
public void testDynamicConfigurationsForceDeleteNamespaceAllowed() throws
Exception {
cleanup();