You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(parallel): verify concurrency via handler-start gap, not wall time
The test measured total client round-trip time (< 1.9s threshold) to prove
the hub invokes parallel tool_calls concurrently. On a loaded VPS the round
trip is ~2.4s even when both handlers ran in 0.8s concurrently, because the
event loop shared between the test's publisher, connection, and httpx client
adds ~1.4s of scheduling overhead — the threshold couldn't distinguish
parallel from serial under that much load.
Replace the wall-clock assertion with a direct concurrency check: record
when each handler starts and assert both started within 0.4s of each other
(serial execution would have a gap >= the first handler's sleep, 0.5s). This
proves the hub dispatched both invocations as concurrent asyncio tasks
regardless of environment-specific round-trip noise. Also:
- Reduce sleep 0.8s → 0.5s and tighten the per-call httpx timeout (15s)
- Keep a loose 8s wall-clock bound only to catch genuine hangs
- Remove unused json import (test never needed it)
0 commit comments