You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Alberto Bustamante Reyes (Jira)" <ji...@apache.org> on 2021/04/30 21:08:00 UTC

[jira] [Assigned] (GEODE-9226) Refactor StartMemberUtils.resolveWorkingDir

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

Alberto Bustamante Reyes reassigned GEODE-9226:
-----------------------------------------------

    Assignee: Alberto Bustamante Reyes

> 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
>
> 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)