The ctx.Done() channel associated with the current test can be used instead. This is a simplification, both approaches work.