Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9251

Refactor TestWriteToReplica and TestFsDatasetImpl to avoid explicitly creating Files in tests code.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.1
    • 2.8.0, 3.0.0-alpha1
    • test
    • None
    • Reviewed

    Description

      In TestWriteToReplica and TestFsDatasetImpl, tests directly creates block and metadata files:

      replicaInfo.getBlockFile().createNewFile();
      replicaInfo.getMetaFile().createNewFile();
      

      It leaks the implementation details of FsDatasetImpl. This JIRA proposes to use FsDatasetImplTestUtils (HDFS-9188) to create replicas.

      Attachments

        1. HDFS-9251.00.patch
          24 kB
          Lei (Eddy) Xu
        2. HDFS-9251.01.patch
          24 kB
          Lei (Eddy) Xu
        3. HDFS-9251.02.patch
          24 kB
          Lei (Eddy) Xu

        Activity

          People

            eddyxu Lei (Eddy) Xu
            eddyxu Lei (Eddy) Xu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: