mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
96e2d3c56f
The test server's flow handler awaited flowPOST before incrementing the invocation counter, which races with the test polling getRun() to see the completed status. When the workflow completed inside flowPOST and flushed the run to the DB, the test could observe the completed state and immediately query /_flow-invocations before the counter was bumped, yielding a flaky 'expected 0 to be 1' assertion. Increment the counter before awaiting flowPOST so the count is observable as soon as the run transitions to completed.
372 B
372 B
@workflow/world-testing
| @workflow/world-testing |
|---|
| patch |
Fix race condition in test server's flow invocation counter that caused intermittent failures in the inline-execution test suite (e.g. "sequential steps complete in a single flow invocation"). The counter is now incremented before awaiting the flow handler, so the count is observable as soon as the run transitions to completed.