[ 
https://issues.apache.org/jira/browse/GEODE-9226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Owen Nichols closed GEODE-9226.
-------------------------------

> 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
>             Fix For: 1.15.0
>
>
> 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.20.7#820007)

Reply via email to