Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ptx/obfs4_test.go): avoid context-vs-normal-code race
We want to test whether we get the context failure if the error generated inside normal code happens _after_ the context cancellation. The best way to do that is to write code that is not racy. To this end, we just need to pause normal code until we know that the context has returned to the caller. We also need to ensure we do not leak a goroutine, hence we use a WaitGroup to check that. Fixes ooni/probe#1750
- Loading branch information