From 40b3987e908b39eb1f41378690d90315d38913c9 Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Wed, 12 Apr 2017 13:35:14 -0700 Subject: [PATCH] Explain cleanup defer in test --- command/agent/consul/int_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/agent/consul/int_test.go b/command/agent/consul/int_test.go index 2f0239d5f..122414243 100644 --- a/command/agent/consul/int_test.go +++ b/command/agent/consul/int_test.go @@ -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