From ddee0878ac5bbb7481ff6e8b57d30747b75e0963 Mon Sep 17 00:00:00 2001 From: acud <12988138+acud@users.noreply.github.com> Date: Wed, 7 Aug 2024 07:19:42 -0600 Subject: [PATCH] test(hare): add cleanup --- hare4/hare_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hare4/hare_test.go b/hare4/hare_test.go index 70f363a8f6..df0d73708a 100644 --- a/hare4/hare_test.go +++ b/hare4/hare_test.go @@ -598,12 +598,15 @@ func (cl *lockstepCluster) waitStopped() { // drainInteractiveMessages will make sure that the channels that signal // that interactive messages came in on the tracer are read from. func (cl *lockstepCluster) drainInteractiveMessages() { + done := make(chan struct{}) + ct.t.Cleanup(func() { close(done) }) for _, n := range cl.nodes { go func() { for { select { case <-n.tracer.compactReq: case <-n.tracer.compactResp: + case <-done: } } }()