Skip to content

Simplify how parallel workers are fed tests - #141

Draft
bbannier wants to merge 6 commits into
topic/bbannier/asynciofrom
topic/bbannier/nextTests-generator
Draft

Simplify how parallel workers are fed tests#141
bbannier wants to merge 6 commits into
topic/bbannier/asynciofrom
topic/bbannier/nextTests-generator

Conversation

@bbannier

@bbannier bbannier commented Jul 27, 2026

Copy link
Copy Markdown
Member

We were using a pretty elaborate protocol with lists and None sentinel values. This PR simplifies so tests now read from a simple generator which encapsulates all the logic. We also do some adjacent cleanups.

@bbannier bbannier self-assigned this Jul 27, 2026
@bbannier bbannier changed the title Remove dead truthiness guards Simplify how parallel workers are fed tests Jul 27, 2026
bbannier added 6 commits July 31, 2026 12:55
`Test` defines no `__bool__`, so every instance is always truthy.
Workers drain naturally when the queue empties rather than checking an
abort flag on every dispatch. The queue is cleared at the point where
the failure is recorded, which is where the abort decision logically
belongs.
Isolates the alternatives-expansion logic from the dispatch loop so the
upcoming generator conversion of `nextTests` stays readable.
Replaces the `None`-sentinel protocol with a generator that yields
individual tests. The worker loop simplifies to a plain `for` and the
`saveTiming` call moves to after the loop, so the timing file is read
and written once per worker rather than once per test.

Reruns appended to the queue by `testFailed` are picked up naturally
on the next outer `while True` iteration.
Align with the snake_case convention used throughout the newer parts of
the codebase.
@bbannier
bbannier force-pushed the topic/bbannier/nextTests-generator branch from 7b15246 to 9124494 Compare July 31, 2026 10:56
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