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
Fix flaky parallel tools test by removing non-deterministic synchronization
The testShouldExecuteMultipleCustomToolsInParallelSingleTurn test used
CountDownLatch barriers to verify that tool handlers overlapped in
execution. This caused a race condition: both handlers completed
simultaneously after the barrier was released, and the order in which
tool results were sent back to the CLI was non-deterministic. When
results arrived in a different order than the snapshot expected
(toolcall_1 before toolcall_0), the proxy returned a 500 error.
The fix simplifies the test to match the reference implementation
approach: tools return immediately, and we verify both tools were
called and the response contains both results. The SDK still dispatches
tools concurrently via its executor; the test just no longer forces
a specific timing that causes ordering issues.
Fixes#158
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
0 commit comments