Consolidate duplicated helper methods across layered fast truncate tests

XMLWordPrintableJSON

    • Storage Engines - Foundations
    • 794.285
    • SE Foundations - Q4+ Backlog
    • None

      Problem

      The layered fast truncate test files (test_layered_fast_truncate01–17, test_layered_fast_truncate_metadata, test_layered_fast_truncate_replay, test_layered_fast_truncate_stepup_delete) each define their own copies of the same helper methods inline. No shared base class exists; all classes inherit directly from wttest.WiredTigerTestCase.

      Duplicated helpers identified:

      • setup_leader() — creates the table and populates initial data on the leader instance
      • setup_follower() — switches to follower role and optionally populates keys
      • visible_keys() — returns all keys visible via a forward table scan
      • populate() — inserts keys with placeholder values
      • get_stat() — retrieves a WiredTiger statistic
      • truncate() / truncate_range() — perform truncate operations with varying bounds
      • search_at() / truncate_and_checkpoint() — point lookups and combined truncate+checkpoint operations

      Proposed Fix

      Extract the common helpers into a shared mixin or base class (e.g. helper_layered_fast_truncate.py) and update all affected test files to inherit from it. Where signatures differ slightly between files, unify them with optional parameters.

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Jie Chen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: