Add a reusable bounded wait_for_sweep test helper

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Trivial - P5
    • WT12.0.0, 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: Test Python
    • None
    • Storage Engines - Foundations, Storage Engines - Persistence
    • 122.756
    • None
    • None

      Motivation

      Waiting for the dhandle sweep server in the Python suite is done several ways with inconsistent semantics:

      • test_layered_follower14 has a bounded wait_for_sweep() (120x1s) that asserts on timeout.
      • test_sweep03 has a bounded wait_for_sweep(baseline) (10x0.5s) that silently falls through on timeout (returns a count, no assertion).
      • test_layered_checkpoint08 polls dh_sweep_dead_close directly (bounded in WT-17719).

      These should be unified into one reusable helper with consistent, assert-on-timeout behaviour so sweep-wait loops fail fast with a clear message instead of hanging to a task-level timeout.

      Approach

      • Add a reusable bounded wait_for_sweep(self, baseline, min_sweeps=1, timeout=60) helper that asserts with a clear message on timeout. Sweep waiting is not disaggregated-specific (test_sweep* use it too), so place it on WiredTigerTestCase in test/suite/helpers/wttest.py.
      • Migrate the existing wait_for_sweep copies and inline sweep-stat poll loops to the shared helper.

      Definition of done

      • Shared bounded wait_for_sweep helper added.
      • Existing copies/inline loops migrated, standardised on assert-on-timeout semantics.
      • Tests still pass on the happy path.

      Follow-up to WT-17719 (see also WT-17700).

            Assignee:
            Etienne Petrel
            Reporter:
            Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: