You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/06/28 15:25:11 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #7369: Add tenant name check in list namespaces function.

codelipenghui commented on a change in pull request #7369:
URL: https://github.com/apache/pulsar/pull/7369#discussion_r446663959



##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/NamespacesTest.java
##########
@@ -252,6 +252,13 @@ public void testGetNamespaces() throws Exception {
         expectedList.sort(null);
         assertEquals(namespaces.getTenantNamespaces(this.testTenant), expectedList);
 
+        try {
+            // check the tenant name is valid
+            namespaces.getTenantNamespaces(this.testTenant + "/default");
+            fail("should have failed");
+        } catch (RestException e) {

Review comment:
       It's better to catch the specific RestException or check the response code.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org