Skip to content

Commit

Permalink
[fix][flaky-test]AdminApi2Test.testDeleteTenant (apache#17070)
Browse files Browse the repository at this point in the history
  • Loading branch information
poorbarcode authored and Technoboy- committed Aug 14, 2022
1 parent 31cc065 commit aa721e6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,13 @@ public void testPreciseBacklog() throws PulsarClientException, PulsarAdminExcept

@Test
public void testDeleteTenant() throws Exception {
// Disabled conf: systemTopicEnabled. see: https://github.com/apache/pulsar/pull/17070
boolean originalSystemTopicEnabled = conf.isSystemTopicEnabled();
if (originalSystemTopicEnabled) {
internalCleanup();
conf.setSystemTopicEnabled(false);
setup();
}
pulsar.getConfiguration().setForceDeleteNamespaceAllowed(false);

String tenant = "test-tenant-1";
Expand Down Expand Up @@ -1384,6 +1391,12 @@ public void testDeleteTenant() throws Exception {
assertFalse(pulsar.getLocalMetadataStore().exists(partitionedTopicPath).join());
assertFalse(pulsar.getLocalMetadataStore().exists(localPoliciesPath).join());
assertFalse(pulsar.getLocalMetadataStore().exists(bundleDataPath).join());
// Reset conf: systemTopicEnabled
if (originalSystemTopicEnabled) {
internalCleanup();
conf.setSystemTopicEnabled(true);
setup();
}
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2919,6 +2919,7 @@ public MockedPulsarService(ServiceConfiguration conf) {
@Override
protected void setup() throws Exception {
super.conf.setLoadManagerClassName(conf.getLoadManagerClassName());
super.conf.setSystemTopicEnabled(conf.isSystemTopicEnabled());
super.internalSetup();
}

Expand Down

0 comments on commit aa721e6

Please sign in to comment.