mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-08-27 04:37:35 +00:00
a96ec7f77e09fe93ef5286862fae52fbaf4bbe35
`test_cancelled_new_does_not_leak_the_pc` demanded an instant at which no key had appeared since its snapshot. That asks the whole suite to go quiet, which `--test-threads=2` never grants: one lane is this test for its entire 30s wait while the other keeps starting sessions, so the difference is never empty and the test fails whatever the pc it is actually watching did. Intersect the difference across samples instead. A concurrent test's session appears and is closed again, so it drops out; a leaked pc never does. The cancelled attempt's own key cannot be named here — its fingerprint is generated inside the task that was abandoned — so outlasting the window is the property available to test, and it is the one that means "leaked". This sharpens what the failure says; it does not make `--test-threads=2` pass. With the new assertion a single `offer:` key still survives all 30s there, and the test passes in 0.5s when run alone, so the entry belongs to another test rather than to the cancelled `new()`. The two that close only their answerer and leave the offerer to an indirect path — `test_session_end_close_reaches_the_peer` (Stream::close_webrtc) and `test_eof_close_then_drop_still_evicts` (Drop) — are where to look. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019UzcMTdYTEv2QbMHcTSUy3
Description
No description provided
Languages
Rust
100%