ModernUO/Projects
Kamron Batman 0f64d834b4
test(crowdsec): pin the drain task to the loop's lifetime
Every other reporter test reaches Stop() without a Start(), so the drain task
was never exercised and the Task<ValueTask> defect passed the whole suite while
doing nothing. Race the drain against a delay: with an empty queue the loop
parks on WaitToReadAsync forever, so a correctly unwrapped task cannot win that
race, while the Task<ValueTask> completed in ~0ms. Then assert Stop() does not
return until the loop has actually exited, which is the precondition the flush
relies on before reading the SingleReader channel.

Verified by reverting DrainLoop to ValueTask: the test fails. A slow pool can
only make it under-detect, never fail spuriously.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-25 11:11:48 -07:00
..
Application fix: Bumps dependencies. (#2531) 2026-07-14 15:17:55 -07:00
BuildTool fix: Bumps dependencies. (#2531) 2026-07-14 15:17:55 -07:00
Logger fix: Bumps dependencies. (#2531) 2026-07-14 15:17:55 -07:00
Server Cleanup 2026-07-25 10:57:07 -07:00
Server.Tests fix(tests): repair the build after the Configure/namespace sweep 2026-07-25 11:07:14 -07:00
UOContent test(crowdsec): pin the drain task to the loop's lifetime 2026-07-25 11:11:48 -07:00
UOContent.Tests test(crowdsec): pin the drain task to the loop's lifetime 2026-07-25 11:11:48 -07:00