Skip to content

Commit

Permalink
drain potential remaining signals
Browse files Browse the repository at this point in the history
  • Loading branch information
kjezek committed Sep 10, 2024
1 parent 5a2f4e7 commit 6af9be8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions go/database/mpt/node_flusher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ func TestNodeFlusher_TriggersFlushesPeriodically(t *testing.T) {
if err := flusher.Stop(); err != nil {
t.Fatalf("failed to stop node flusher: %v", err)
}

// drain potential remaining signals
for {
select {
case <-flushSignal:
default:
return
}
}
}

func TestNodeFlusher_ErrorsAreCollected(t *testing.T) {
Expand Down

0 comments on commit 6af9be8

Please sign in to comment.