[
https://issues.apache.org/jira/browse/ZOOKEEPER-3012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Patrick Hunt resolved ZOOKEEPER-3012.
-------------------------------------
Resolution: Fixed
Hadoop Flags: Reviewed
> Fix unit test: testDataDirAndDataLogDir should not use hardcode test folders
> ----------------------------------------------------------------------------
>
> Key: ZOOKEEPER-3012
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3012
> Project: ZooKeeper
> Issue Type: Improvement
> Components: server, tests
> Affects Versions: 3.5.3, 3.4.11
> Reporter: Andor Molnar
> Assignee: Andor Molnar
> Priority: Major
> Labels: unit-test
> Fix For: 3.5.4, 3.6.0, 3.4.13
>
>
> The following arrange methods uses hard coded values:
> {noformat}
> when(configMock.getDataDir()).thenReturn("/tmp/zookeeper");
> when(configMock.getDataLogDir()).thenReturn("/tmp/zookeeperLog");
> {noformat}
> Which makes the test fail if the folders exist on the running machine.
> Random test folders should be created and removed during cleanup.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)