Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-11804

We should have one way to skip Python tests

    • Type: Icon: Technical Debt Technical Debt
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.2.0, 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 5

      We can skip Python tests checking if a hook is enabled:

              if self.runningHook('tiered'):
                  self.skipTest("this test does not yet work with tiered storage")
      

      Or if the test is defined in a list in the hook creator, for instance in hook_tiered.py:

          # Is this test one we should skip?
          def skip_test(self, test):
              # Skip any test that contains one of these strings as a substring
              skip = ["backup",               # Can't backup a tiered table
                      "env01",                # Using environment variable to set WT home
                      "config02",             # Using environment variable to set WT home
                      "cursor13_ckpt",        # Checkpoint tests with cached cursors
                      "cursor13_dup",         # More cursor cache tests
                      "cursor13_reopens",     # More cursor cache tests
                      "inmem",                # In memory tests don't make sense with tiered storage
      ...
      

      I would suggest we keep the first way as it makes it explicit as to why a test is skipped. When a test is skipped because it is present in the list, it is skipped silently and no message is printed.

            Assignee:
            andrew.morton@mongodb.com Andrew Morton
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: