mirror of
https://github.com/livekit/livekit.git
synced 2026-09-04 14:55:31 +00:00
TestUnsubscribe checked that the changed-notifier observer was gone as soon as the unsubscribe had settled, but setDesired leaves the RemoveObserver call to a goroutine of its own and nothing the test waits on orders against it, so CI caught the assertion running first. TestSubscribe has the same defect on the unsubscribed callback, which unmarkSubscribedTo delivers with a bare go while the subscribed one is called inline. Wait for both, each with a message of its own, so that a leak that is real still says which of them broke. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>