Fix flaky test TestSubscribeWithContextDone Instead of comparing the number of goroutines which is inherently unreliable, we count the number of goroutines that exited using a defer statement, and an atomic counter.
By the way, the timer are reduced to 100ms as it is more than enough time to let the goroutines exit.