goroutine: Deterministic test
Created by: keegancsmith
The previous test didn't actually ensure that the panic handler ran inside of goroutine.Go. Previously when we close the done channel, we hadn't yet handled the error in goroutine.Go. We now sneakily close it when the error is logged, which is inside of the panic handler.
This does seem a bit brittle, but if it does break the test will timeout. Additionally this will prevent some non-determinism I regarding test coverage and this package.