Skip to content

Commit

Permalink
[cherry-pick][branch-2.10] fix test after cherry-pick #17338
Browse files Browse the repository at this point in the history
  • Loading branch information
liangyepianzhou committed Dec 12, 2022
1 parent 1d89e0c commit d149992
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,7 @@ private void setNamespaceAttr(NamespaceAttr namespaceAttr){
public void testDeleteNamespace(NamespaceAttr namespaceAttr) throws Exception {
// Set conf.
internalCleanup();
conf.setTopicLevelPoliciesEnabled(true);
NamespaceAttr originalNamespaceAttr = markOriginalNamespaceAttr();
setNamespaceAttr(namespaceAttr);
setup();
Expand All @@ -1440,12 +1441,12 @@ public void testDeleteNamespace(NamespaceAttr namespaceAttr) throws Exception {
assertEquals(admin.namespaces().getNamespaces(tenant), Lists.newArrayList(namespace));

// create topic
String topic = namespace + "/test-topic";
String topic = "persistent://" + namespace + "/test-topic";
admin.topics().createPartitionedTopic(topic, 10);
assertFalse(admin.topics().getList(namespace).isEmpty());

// Wait for change event topic and compaction create finish.
awaitChangeEventTopicAndCompactionCreateFinish(namespace, String.format("persistent://%s", topic));
awaitChangeEventTopicAndCompactionCreateFinish(namespace, topic);

try {
admin.namespaces().deleteNamespace(namespace, false);
Expand All @@ -1456,7 +1457,6 @@ public void testDeleteNamespace(NamespaceAttr namespaceAttr) throws Exception {

// delete topic
admin.topics().deletePartitionedTopic(topic);
assertTrue(admin.topics().getList(namespace).isEmpty());

// delete namespace
admin.namespaces().deleteNamespace(namespace, false);
Expand Down

0 comments on commit d149992

Please sign in to comment.