Skip to content

Commit

Permalink
Update pkg/lib/watcher/manager_test.go
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
wdbaruni and coderabbitai[bot] authored Nov 21, 2024
1 parent 2306540 commit c8735e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/lib/watcher/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ func (s *ManagerTestSuite) TestStopWithTimeout() {
}, 200*time.Millisecond, 10*time.Millisecond)

// sleep and verify that the watcher is still stopping
time.Sleep(100 * time.Millisecond)
s.Require().Equal(watcher.StateStopping, w.Stats().State)
s.Require().Eventually(func() bool {
return w.Stats().State == watcher.StateStopping
}, 200*time.Millisecond, 10*time.Millisecond)

// Unblock GetEvents
close(getEventsCh)
Expand Down

0 comments on commit c8735e1

Please sign in to comment.