Skip to content

Commit

Permalink
Fix scavenger test suite leaky logger (#5490)
Browse files Browse the repository at this point in the history
  • Loading branch information
3vilhamster authored Dec 18, 2023
1 parent deed4f0 commit 59f540d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion service/worker/scanner/tasklist/scavenger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,16 @@ func (s *ScavengerTestSuite) TestAllExpiredTasksWithErrors() {
func (s *ScavengerTestSuite) runScavenger() {
s.scvgr.Start()
timer := time.NewTimer(scavengerTestTimeout)

waiter := make(chan struct{})

go func() {
s.scvgr.stopWG.Wait()
close(waiter)
}()

select {
case <-s.scvgr.stopC:
case <-waiter:
timer.Stop()
return
case <-timer.C:
Expand Down

0 comments on commit 59f540d

Please sign in to comment.