Files
magpie/internal
ggbdpqandJackzigen e89a4b3c77 gateway tests: a re-asked slowThinker drops its done send instead of blocking (#4530)
slowThinker.done held one send, and a try that is asked again serves
the same fake vendor a second time: the second handler blocked on the
send forever, the reply it served never ended, and t.Cleanup(vendor.
Close) waited on it until go test's own timeout — no test failure, no
output, the whole package with it (#4530).

The tests read the time once; later sends can drop (Jackzigen's fix
in gh#4530, adopted): the send is non-blocking, and
TestThinkingVendorAskedAgainStillEnds, which asks a Gemini fake that
only reasons and whose reply is asked again in place (#667), reads the
reply to its end instead of hanging.

Squashed from the patch's two commits (test, then fix), so no commit
on main hangs the package.

Broken by hand: with the blocking `s.done <- time.Now()` put back,
TestThinkingVendorAskedAgainStillEnds hangs until -timeout 120s
panics, with a serve stuck at thinking_streams_test.go:40. With the
patch it passes in 1.4s, and -race -count=20 is ok.

Co-authored-by: Jackzigen <9687529+Jackzigen@users.noreply.github.com>
2026-11-01 02:45:01 +08:00
..
…
…
…
…
…
…