Skip to content

Replace defer with t.Cleanup in tests

The following discussion from !1021 (merged) should be addressed:

  • @proglottis started a discussion: (+3 comments)

    defer in tests are probably here because we didn't have t.Cleanup before. It's also not just for Parallel() tests, IMO it gives a clear idea that the Stop method needs to be called as part of cleaning up after a test, so I'd also suggest using t.Cleanup in the future.