diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest.java index b145e4d19a39e..07a973033ea3d 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiTest.java @@ -1219,7 +1219,9 @@ public void testDeleteTenantForcefully() throws Exception { // delete tenant forcefully admin.tenants().deleteTenant(tenant, true); - assertFalse(admin.tenants().getTenants().contains(tenant)); + Awaitility.await().untilAsserted(() -> { + assertFalse(admin.tenants().getTenants().contains(tenant)); + }); admin.tenants().createTenant(tenant, new TenantInfoImpl(Sets.newHashSet("role1", "role2"), Sets.newHashSet("test")));