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

Refactor HDFS tool tests for better reuse

    XMLWordPrintableJSON

Details

    • Reviewed
    • Important

    Description

      Currently, the test cases written in hdfs-tool-test.h isn't easy to reuse. Primarily because the expectations are different for each HDFS tool. I realized this while I was creating the PR for HDFS-16260. For instance, passing more than one argument is erroneous to hdfs_allowSnapshot while it's the only valid scenario for hdfs_deleteSnapshot.

      Thus, it won't be possible to reuse the test cases without decoupling the expectations from the test case definitions. The solution here is to move the expectations to the corresponding mock classes and invoke the call to set them up in the test cases after the creation of mock instances.

      Attachments

        Issue Links

          Activity

            People

              gaurava Gautham Banasandra
              gaurava Gautham Banasandra
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h