Skip to content

perf: bail out when an impossible pairwise tuple cannot be covered - #225

Merged
AArnott merged 1 commit into
mainfrom
fix/pairwise-impossible-pair-early-exit
Oct 6, 2026
Merged

AArnott merged 1 commit into
mainfrom
fix/pairwise-impossible-pair-early-exit

Conversation

@AArnott

@AArnott AArnott commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Summary

When exclusions make a selected pairwise tuple unreachable, CreateRandomTestCase returns null after FindAllowedTestCase has already searched every completion of that tuple. The maximization loop then repeated that search up to six more times with no chance of success.

Return null immediately instead. Same change as reviewed on thomhurst/TUnit#6971.

Test plan

  • CI green
  • Existing pairwise/exclusion tests still cover the unreachable-pair path

When CreateRandomTestCase returns null, FindAllowedTestCase has already
exhausted every completion of the selected tuple. Continuing the seven
attempt maximization loop only repeats that expensive search. Return
null immediately, matching the same fix applied in TUnit's PairwiseStrategy.
@AArnott
AArnott merged commit a2a8dfe into main Oct 6, 2026
4 checks passed
@AArnott
AArnott deleted the fix/pairwise-impossible-pair-early-exit branch October 6, 2026 16:48
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