From 80627b29dd31da2f8540a472bfe46280009c4f0a Mon Sep 17 00:00:00 2001 From: bstrausser Date: Sun, 3 Mar 2024 12:33:29 -0500 Subject: [PATCH] Try fix failing test --- copy_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/copy_test.go b/copy_test.go index 12f7751..6a1a2f1 100644 --- a/copy_test.go +++ b/copy_test.go @@ -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))