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

ASF subversion and git services commented on GEODE-9226:
--------------------------------------------------------

Commit 97e191a6374f77b7fb5b7e05a4f31e39ce1033b6 in geode's branch 
refs/heads/develop from Alberto Bustamante Reyes
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=97e191a ]

GEODE-9226: Refactor StartMemberUtils.resolveWorkingDir (#6416)



> Refactor StartMemberUtils.resolveWorkingDir
> -------------------------------------------
>
>                 Key: GEODE-9226
>                 URL: https://issues.apache.org/jira/browse/GEODE-9226
>             Project: Geode
>          Issue Type: Improvement
>            Reporter: Alberto Bustamante Reyes
>            Assignee: Alberto Bustamante Reyes
>            Priority: Major
>              Labels: pull-request-available
>
> StartMemberUtils contains utility methods used by StartLocatorCommand & 
> StartServerCommand.
> One of them is resolveWorkingDir which returns the working directory to be 
> used by the member. Part of the logic of this procedure is placed outside the 
> function:
> {code}
> workingDirectory = StartMemberUtils.resolveWorkingDir(workingDirectory == 
> null ? null : new File(workingDirectory), new File(memberName));
> {code}
> This causes that unit tests of that function need to create an instance of 
> StartLocatorCommand & StartServerCommand classes.
> And this has two negative consequences:
> * When a new startup parameter is added to locators and/or server, the tests 
> of resolveWorkingDir have to be modified.
> * Tests are duplicated: there is a test class for every class using 
> resolveWorkingDir (StartLocatorCommandWorkingDirectoryTest & 
> StartServerCommandWorkingDirectoryTest). 
> The function and the tests should be refactored to improve the code. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to