Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-3012

Fix unit test: testDataDirAndDataLogDir should not use hardcode test folders

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5.3, 3.4.11
    • Fix Version/s: 3.5.4, 3.6.0, 3.4.13
    • Component/s: server, tests
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      The following arrange methods uses hard coded values:

      when(configMock.getDataDir()).thenReturn("/tmp/zookeeper");
      when(configMock.getDataLogDir()).thenReturn("/tmp/zookeeperLog");
      

      Which makes the test fail if the folders exist on the running machine.

      Random test folders should be created and removed during cleanup.

        Attachments

          Activity

            People

            • Assignee:
              andor Andor Molnar
              Reporter:
              andor Andor Molnar
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: