Skip to content

Simplify how parallel workers are fed tests - #141

Merged
bbannier merged 6 commits into
masterfrom
topic/bbannier/nextTests-generator
Sep 15, 2026
Merged

bbannier merged 6 commits into
masterfrom
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
bbannier force-pushed the topic/bbannier/nextTests-generator branch from 7b15246 to 9124494 Compare July 31, 2026 10:56
@bbannier
bbannier force-pushed the topic/bbannier/nextTests-generator branch from 9124494 to f2f6f14 Compare August 19, 2026 14:13
`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 f2f6f14 to 42593b6 Compare September 10, 2026 06:11
@bbannier
bbannier marked this pull request as ready for review September 11, 2026 08:04
@bbannier
bbannier requested a review from timwoj September 11, 2026 08:04
Comment thread btest
Base automatically changed from topic/bbannier/asyncio to master September 15, 2026 07:15
@bbannier
bbannier merged commit c00f2e0 into master Sep 15, 2026
23 of 45 checks passed
@bbannier
bbannier deleted the topic/bbannier/nextTests-generator branch September 15, 2026 07:15
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.

2 participants