You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Xiang Li (JIRA)" <ji...@apache.org> on 2019/03/16 03:37:00 UTC
[jira] [Comment Edited] (HBASE-22051) Expect value is hard-coded in
TestRSGroupsBasics
[ https://issues.apache.org/jira/browse/HBASE-22051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16794112#comment-16794112 ]
Xiang Li edited comment on HBASE-22051 at 3/16/19 3:36 AM:
-----------------------------------------------------------
Uploaded patch v000. The logic change of it includes the 3 places mentioned in the "description", to remove the hard-coded verification and use variables instead.
The patches also make some changes to improve the readability:
* Rename some variables, like "targetServer" --> "serverToStop", "appInfo" --> "deadServerGroup"
* Add or correct some comments
[~xucang], would you please review it at your convenience?
was (Author: water):
Uploaded patch v000. The logic change of it includes the 3 places mentioned in the "description", to remove the hard-coded verification and use the variables instead.
The patches also make some changes to improve the readability:
* Rename some variables, like "targetServer" --> "serverToStop", "appInfo" --> "deadServerGroup"
* Add or correct some comments
[~xucang], would you please review it at your convenience?
> Expect value is hard-coded in TestRSGroupsBasics
> ------------------------------------------------
>
> Key: HBASE-22051
> URL: https://issues.apache.org/jira/browse/HBASE-22051
> Project: HBase
> Issue Type: Improvement
> Components: rsgroup, test
> Reporter: Xiang Li
> Assignee: Xiang Li
> Priority: Minor
>
> In TestRSGroupsBase, we have NUM_SLAVES_BASE = 4, which is used to launch the mini cluster. But in some verifications of TestGroupsBasics, such as in testBasicStartUp(), the expected value is hard-coded as 4, like:
> {code:java}
> public void testBasicStartUp() throws IOException {
> ...
> assertEquals(4, defaultInfo.getServers().size());
> ..
> }
> {code}
> We could also some other places which have hard-coded verifications, as follow:
> {code:java}
> public void testClearDeadServers() throws Exception {
> ...
> final RSGroupInfo newGroup = addGroup(getGroupName(name.getMethodName()), 3);
> ...
> assertEquals(2, newGroupServers.size());
> {code}
> and
> {code:java}
> public void testClearNotProcessedDeadServer() throws Exception {
> ...
> RSGroupInfo appInfo = addGroup("deadServerGroup", 1);
> ...
> assertEquals(1, notClearedServers.size());
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)