Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-14170

FileSystemContractBaseTest is not cleaning up test directory clearly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9.0, 3.0.0-alpha4, 2.8.6
    • fs
    • None

    Description

      In FileSystemContractBaseTest::tearDown() method, it cleans up the path("/test") directory, which will be qualified as /test (against root instead of working directory because it's absolute):

        @Override
        protected void tearDown() throws Exception {
          try {
            if (fs != null) {
              fs.delete(path("/test"), true);
            }
          } catch (IOException e) {
            LOG.error("Error deleting /test: " + e, e);
          }
        }
      

      But in the test, it uses path("test") sometimes, which will be made qualified against the working directory (e.g. /user/bob/test).

      This makes some tests fail intermittently, e.g. ITestS3AFileSystemContract. Also see the discussion in HADOOP-13934.

      Attachments

        1. HADOOP-14170-branch-2.004.patch
          21 kB
          Mingliang Liu
        2. HADOOP-14170-branch-2.003.patch
          21 kB
          Mingliang Liu
        3. HADOOP-14170.004.patch
          27 kB
          Mingliang Liu
        4. HADOOP-14170.003.patch
          28 kB
          Mingliang Liu
        5. HADOOP-14170.002.patch
          28 kB
          Mingliang Liu
        6. HADOOP-14170.001.patch
          18 kB
          Mingliang Liu
        7. HADOOP-14170.000.patch
          18 kB
          Mingliang Liu

        Issue Links

          Activity

            People

              liuml07 Mingliang Liu
              liuml07 Mingliang Liu
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: