Skip to content

Commit d065523

Browse files
authored
fix(test): raise spawn-child join timeout in test_multi_process_visibility (#13588)
The test spawns a child via multiprocessing spawn context, which cold-imports the full langflow package (plus coverage's multiprocessing hooks in CI) before appending a single event. The 10s join timeout is routinely exceeded on a loaded CI runner sharing 4 vCPUs with a second xdist worker: in nightly run 27253229568 (Unit Tests - Python 3.12 - Group 5) the test failed all 12 executions (5 reruns x 2 step attempts), each rerun exactly 10s apart - the join deadline, not a product bug. Raise the liveness bound to 60s (join returns immediately when the child exits, so the passing case is unaffected) and kill the child on timeout so a hung spawn can't leak into later tests.
1 parent 1744792 commit d065523

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/backend/tests/unit/test_flow_events_service.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,13 @@ def test_multi_process_visibility(tmp_path):
225225
args=(str(shared_dir), "flow-mp", "component_added", "from-other-process"),
226226
)
227227
proc.start()
228-
proc.join(timeout=10)
228+
# Generous bound: a spawned child cold-imports the full langflow package
229+
# (plus coverage's multiprocessing hooks in CI), which can take >10s on a
230+
# loaded CI runner sharing 4 vCPUs with another xdist worker.
231+
proc.join(timeout=60)
232+
if proc.is_alive():
233+
proc.kill()
234+
proc.join(timeout=5)
229235
assert proc.exitcode == 0, "Child process failed to append event"
230236

231237
reader = FlowEventsService(cache_dir=shared_dir)

0 commit comments

Comments
 (0)