Skip to content

[TST] Gate property test compaction waits behind a toggle - #7674

Closed
rescrv wants to merge 1 commit into
mainfrom
rescrv/test-filtering
Closed

[TST] Gate property test compaction waits behind a toggle#7674
rescrv wants to merge 1 commit into
mainfrom
rescrv/test-filtering

Conversation

@rescrv

@rescrv rescrv commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description of changes

Property filtering tests unconditionally waited for random compactions
in cluster mode, which made runs slow and flaky. Introduce
hypothesis_driven_compaction_waits_enabled() in conftest, driven by the
CHROMA_HYPOTHESIS_COMPACTION_WAITS env var (auto/always/never). In auto
mode, waits only run under the "slow" preset.

Refactor the repeated @settings decorators in test_filtering.py into a
shared filtering_settings() helper that lowers max_examples in cluster
mode and optionally suppresses the filter_too_much health check. Replace
the direct "not NOT_CLUSTER_ONLY" compaction-wait guards with the new
RUN_RANDOM_COMPACTION_WAITS flag.

Add test_hypothesis_settings.py covering the preset/mode matrix,
the outside-cluster short circuit, and invalid-mode rejection. Also
tighten type annotations across the filtering tests.

Test plan

CI only

Migration plan

N/A

Observability plan

N/A

Documentation Changes

N/A

Co-authored-by: AI

Property filtering tests unconditionally waited for random compactions
in cluster mode, which made runs slow and flaky. Introduce
hypothesis_driven_compaction_waits_enabled() in conftest, driven by the
CHROMA_HYPOTHESIS_COMPACTION_WAITS env var (auto/always/never). In auto
mode, waits only run under the "slow" preset.

Refactor the repeated @settings decorators in test_filtering.py into a
shared filtering_settings() helper that lowers max_examples in cluster
mode and optionally suppresses the filter_too_much health check. Replace
the direct "not NOT_CLUSTER_ONLY" compaction-wait guards with the new
RUN_RANDOM_COMPACTION_WAITS flag.

Add test_hypothesis_settings.py covering the preset/mode matrix,
the outside-cluster short circuit, and invalid-mode rejection. Also
tighten type annotations across the filtering tests.

Co-authored-by: AI

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@rescrv rescrv closed this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant