Skip to content

Commit

Permalink
Try fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
bstrausser committed Mar 3, 2024
1 parent f1ac460 commit 80627b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions copy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ func TestTimeThrottle(t *testing.T) {
wait = time.Duration(time.Second * 60)
throttle = TimeThrottle{time.Now(), wait}
present := throttle.lastExecutionTime
// Without the sleep this can fail. At least on windows
// https://github.com/folbricht/desync/actions/runs/8131384060/job/22220648517?pr=258
time.Sleep(time.Duration(time.Millisecond*100))
throttle.reset()
future := throttle.lastExecutionTime
require.True(t, present.Before(future))
Expand Down

0 comments on commit 80627b2

Please sign in to comment.