Skip to content

Commit c6d040b

Browse files
committed
Make parallel suite wait for runners
1 parent 2053707 commit c6d040b

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Reliable parallel suite startup ordering
3+
type: bugfix
4+
authors:
5+
- IyeOnline
6+
- codex
7+
created: 2026-06-02T13:19:12.043532Z
8+
---
9+
10+
Parallel suites now preserve suite member startup order more reliably, making
11+
publisher/subscriber and other interdependent pipeline suites less prone to
12+
startup races.
13+
14+
Use the existing `suite.mode: parallel` configuration:
15+
16+
```yaml
17+
suite:
18+
name: pipeline-suite
19+
mode: parallel
20+
min_jobs: 2
21+
```
22+
23+
When enough jobs are available for the whole suite, the harness still runs
24+
members concurrently, but it submits later suite members first so earlier
25+
members can establish subscriptions before dependent publishers start sending
26+
events.

src/tenzir_test/run.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,8 @@ def is_valid(self) -> bool:
433433

434434
@dataclasses.dataclass(slots=True)
435435
class SuiteQueueState:
436+
"""Track pending parallel suites that should reserve slots before other work."""
437+
436438
pending_items: int = 0
437439

438440

@@ -5369,7 +5371,8 @@ def _run_suite_parallel(
53695371
max_workers=reserved_workers,
53705372
thread_name_prefix="suite",
53715373
) as executor:
5372-
for index, test_item in enumerate(tests, start=1):
5374+
indexed_tests = list(enumerate(tests, start=1))
5375+
for index, test_item in reversed(indexed_tests):
53735376
if interrupt_requested():
53745377
interrupted = True
53755378
break

0 commit comments

Comments
 (0)