Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-13851

Speed up ap_verify unit tests

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: ap_verify
    • Labels:
      None
    • Story Points:
      4
    • Sprint:
      AP S18-6, AP F18-1
    • Team:
      Alert Production

      Description

      As of DM-13524, ap_verify's full set of unit tests takes 16 seconds to run. While this running time is still acceptable, adding new tests will likely push the running time to the point where developers are discouraged from running the tests.

      This ticket should try to reduce the unit tests' running time by a factor of at least 3. Further speedup is likely impossible because many of the tests must involve file I/O.

        Attachments

          Issue Links

            Activity

            Hide
            krzys Krzysztof Findeisen added a comment -

            Hi John Parejko, as our unit testing expert can you take a more detailed look at this ticket? I ended up not using unittest.mock anywhere because of various complications (it's design seems more oriented towards white-box testing, tests of ingestion must be expressed in terms of state changes rather than function behavior, etc.).

            Show
            krzys Krzysztof Findeisen added a comment - Hi John Parejko , as our unit testing expert can you take a more detailed look at this ticket? I ended up not using unittest.mock anywhere because of various complications (it's design seems more oriented towards white-box testing, tests of ingestion must be expressed in terms of state changes rather than function behavior, etc.).
            Hide
            Parejkoj John Parejko added a comment -

            Reviewed: thanks again for humoring me on using unittest.mock, and I'm glad we made it work.

            Show
            Parejkoj John Parejko added a comment - Reviewed: thanks again for humoring me on using unittest.mock, and I'm glad we made it work.
            Hide
            krzys Krzysztof Findeisen added a comment -

            Oops, forgot to close this.

            Show
            krzys Krzysztof Findeisen added a comment - Oops, forgot to close this.

              People

              Assignee:
              krzys Krzysztof Findeisen
              Reporter:
              krzys Krzysztof Findeisen
              Reviewers:
              John Parejko
              Watchers:
              John Parejko, Krzysztof Findeisen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: