Skip to content

Commit

Permalink
Support setting forceDeleteTenantAllowed dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
Technoboy- committed Oct 25, 2022
1 parent f63356c commit 047d67e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ The delayed message index bucket time step(in seconds) in per bucket snapshot se

@FieldContext(
category = CATEGORY_POLICIES,
dynamic = true,
doc = "Allow forced deletion of tenants. Default is false."
)
private boolean forceDeleteTenantAllowed = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1508,4 +1508,16 @@ public void testDynamicConfigurationsForceDeleteNamespaceAllowed() throws Except
assertTrue(conf.isForceDeleteNamespaceAllowed());
});
}

@Test
public void testDynamicConfigurationsForceDeleteTenantAllowed() throws Exception {
cleanup();
conf.setForceDeleteTenantAllowed(false);
setup();
admin.brokers()
.updateDynamicConfiguration("forceDeleteTenantAllowed", "true");
Awaitility.await().untilAsserted(()->{
assertTrue(conf.isForceDeleteTenantAllowed());
});
}
}

0 comments on commit 047d67e

Please sign in to comment.