[ 
https://issues.apache.org/jira/browse/GEODE-3539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16254565#comment-16254565
 ] 

ASF GitHub Bot commented on GEODE-3539:
---------------------------------------

jinmeiliao commented on a change in pull request #1052: GEODE-3539: Add missing 
test coverage for 'list regions' and 'describe region' commands
URL: https://github.com/apache/geode/pull/1052#discussion_r151294390
 
 

 ##########
 File path: 
geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ListRegionCommand.java
 ##########
 @@ -110,4 +108,17 @@ public Result listRegion(
     }
     return result;
   }
+
+  public static class ListRegionInterceptor extends 
AbstractCliAroundInterceptor {
 
 Review comment:
   You probably did not rebase to the current develop, I just made a change in 
CommandExecutor to process UserErrorException differently than general 
exception. That would probably ease your concern. 
   
   The getMemberXXX call would have to throw an exception anyway to catch the 
cases where some commands do not do that validation in their interceptors.  So 
that pair of throw/catch needs to exist anyway. But it's your call whether you 
add an interceptor to handle it for this command or not.
   
   You are right Exceptions should be exceptional. We are trying to move the 
commands away from using getXXX calls (which throws an exception when not 
found) and uses findXXX which would either return null or empty list, and your 
code would handle what to return when nothing is found. But that's for another 
ticket.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add more test coverage for p2p commands
> ---------------------------------------
>
>                 Key: GEODE-3539
>                 URL: https://issues.apache.org/jira/browse/GEODE-3539
>             Project: Geode
>          Issue Type: Improvement
>          Components: gfsh
>            Reporter: Jinmei Liao
>
> Add more command tests that would eventually get rid of the legacy tests.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to