mirror of
https://github.com/rclone/rclone.git
synced 2025-06-19 15:21:28 +08:00
lib/cache,rc/jobs: make tests more reliable
This commit is contained in:
2
lib/cache/cache_test.go
vendored
2
lib/cache/cache_test.go
vendored
@ -115,7 +115,7 @@ func TestCacheExpire(t *testing.T) {
|
||||
entry.lastUsed = time.Now().Add(-c.expireDuration - 60*time.Second)
|
||||
assert.Equal(t, true, c.expireRunning)
|
||||
c.mu.Unlock()
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
time.Sleep(250 * time.Millisecond)
|
||||
c.mu.Lock()
|
||||
assert.Equal(t, false, c.expireRunning)
|
||||
assert.Equal(t, 0, len(c.cache))
|
||||
|
Reference in New Issue
Block a user