Skip to content

Commit

Permalink
fix topic not found issue in ProxyAuthorizationWithoutImplicitPermiss…
Browse files Browse the repository at this point in the history
…ionOnSubscriptionTest
  • Loading branch information
nikhil-ctds committed Dec 27, 2024
1 parent c067284 commit 7ef66a1
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ public void testAuthorizationServiceDirectly() throws Exception {
assertTrue(auth.canLookup(TopicName.get("persistent://p1/c1/ns1/ds1"), "my-role", null));
assertTrue(auth.canProduce(TopicName.get("persistent://p1/c1/ns1/ds1"), "my-role", null));

String topic = "persistent://p1/c1/ns1/ds2";
admin.topics().createNonPartitionedTopic(topic);
admin.topics().grantPermission("persistent://p1/c1/ns1/ds2", "other-role",
EnumSet.of(AuthAction.consume));
waitForChange();
Expand Down Expand Up @@ -134,6 +136,7 @@ public void testAuthorizationServiceDirectly() throws Exception {
assertTrue(auth.canProduce(TopicName.get("persistent://p1/c1/ns1/ds1"), "my-role", null));
assertTrue(auth.canConsume(TopicName.get("persistent://p1/c1/ns1/ds1"), "my-role", null, null));

admin.topics().delete(topic);
admin.namespaces().deleteNamespace("p1/c1/ns1");
admin.tenants().deleteTenant("p1");
admin.clusters().deleteCluster("c1");
Expand Down

0 comments on commit 7ef66a1

Please sign in to comment.