Alberto Bustamante Reyes created GEODE-9226:
-----------------------------------------------
Summary: Refactor StartMemberUtils.resolveWorkingDir
Key: GEODE-9226
URL: https://issues.apache.org/jira/browse/GEODE-9226
Project: Geode
Issue Type: Improvement
Reporter: Alberto Bustamante Reyes
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)