zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andor Molnar (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ZOOKEEPER-3012) Fix unit test: testDataDirAndDataLogDir should not use hardcode test folders
Date Tue, 27 Mar 2018 15:20:00 GMT
Andor Molnar created ZOOKEEPER-3012:
---------------------------------------

             Summary: 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.4.11, 3.5.3
            Reporter: Andor Molnar
            Assignee: Andor Molnar
             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)

Mime
View raw message