Explain cleanup defer in test

This commit is contained in:
Michael Schurter 2017-04-12 13:35:14 -07:00
parent 0a59982936
commit 40b3987e90
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ func TestConsul_Integration(t *testing.T) {
tr.MarkReceived()
go tr.Run()
defer func() {
// Just in case cleanup
// Make sure we always shutdown task runner when the test exits
select {
case <-tr.WaitCh():
// Exited cleanly, no need to kill