Skip to content

Commit

Permalink
test(hare): add cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
acud committed Aug 7, 2024
1 parent 6b39ce4 commit ddee087
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hare4/hare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) })

Check failure on line 602 in hare4/hare_test.go

View workflow job for this annotation

GitHub Actions / coverage

undefined: ct

Check failure on line 602 in hare4/hare_test.go

View workflow job for this annotation

GitHub Actions / unittests (ubuntu-22.04)

undefined: ct

Check failure on line 602 in hare4/hare_test.go

View workflow job for this annotation

GitHub Actions / lint

undefined: ct (compile)

Check failure on line 602 in hare4/hare_test.go

View workflow job for this annotation

GitHub Actions / unittests (self-hosted, macOS, ARM64, go-spacemesh)

undefined: ct

Check failure on line 602 in hare4/hare_test.go

View workflow job for this annotation

GitHub Actions / unittests (self-hosted, macOS, ARM64, go-spacemesh)

undefined: ct
for _, n := range cl.nodes {
go func() {
for {
select {
case <-n.tracer.compactReq:
case <-n.tracer.compactResp:
case <-done:
}
}
}()
Expand Down

0 comments on commit ddee087

Please sign in to comment.