Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.11.0
    • Fix Version/s: 1.11.0
    • Component/s: Tools, Build & Test
    • Labels:
      None

      Description

      The OptionManager interface serves two purposes:

      • Create and modify options
      • Access option values

      The implementations of this class are integrated with the rest of Drill, making it difficult to use the classes in isolation in unit testing. Further, since operators are given the full interface, the operator has the ability to modify options, and so each unit test should either verify that no modification is, in fact, done, or must track down modifications and test them.

      For operator and sub-operator unit tests we need a simpler interface. As it turns out, most low-level uses of OptionManager are all read-only. This allows a simple refactoring to enhance unit testability: create a new super-interface OptionSet, which provides only the read-only methods.

      Then, refactor low-level classes (code generation, compilers, and so on) to use the restricted OptionSet interface.

      Finally, for unit tests, create a trivial, map-based implementation that can be populated as needed for each specific test.

        Attachments

          Activity

            People

            • Assignee:
              paul-rogers Paul Rogers
              Reporter:
              paul-rogers Paul Rogers
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: