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

Ted Yu commented on HBASE-20500:
--------------------------------

This was the error from first test failure (patch v1):
{code}
[ERROR] 
org.apache.hadoop.hbase.rsgroup.TestRSGroups.testMoveServersFromDefaultGroup(org.apache.hadoop.hbase.rsgroup.TestRSGroups)
[ERROR]   Run 1: 
TestRSGroups>TestRSGroupsBase.testMoveServersFromDefaultGroup:358
{code}
This was the failed assertion:
{code}
+      String exp = "should keep at least one server in 'default' RSGroup.";
+      assertTrue(ex.getMessage().contains(exp));
{code}
If you look at the spelling of the sentence in the test and spelling in 
RSGroupAdminServer.java, you would see why the test failed.

A better way of checking exception message:
{code}
+          throw new ConstraintException("should keep at least one server in 
'default' RSGroup.");
{code}
is to declare a (package private) String constant in RSGroupAdminServer and 
reference the constant in the test.

This way, even if the exception message is modified by anyone in the future, 
the test would still pass.

> [rsgroup] should keep at least one server in default group
> ----------------------------------------------------------
>
>                 Key: HBASE-20500
>                 URL: https://issues.apache.org/jira/browse/HBASE-20500
>             Project: HBase
>          Issue Type: Bug
>          Components: rsgroup
>    Affects Versions: 2.0.0-beta-2
>            Reporter: Yechao Chen
>            Assignee: Yechao Chen
>            Priority: Major
>         Attachments: HBASE-20500-branch-2.v1.patch, 
> HBASE-20500-master.v1.patch, HBASE-20500-master.v2.patch, 
> HBASE-20500-master.v3.patch, HBASE-20500-master.v4.patch
>
>
> we move all the servers from default group
> the default group will has  no servers,
> then we create a  new table ,
> it will failed case of the default group has no servers
> eorr info is :
> EROOR: ConstraintException:Target RSGroup must have at lease on server
>  
> we should keep at least one server in 'default' RSGroup
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to