mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-02 22:50:18 +00:00
Decrease timing sensitivity of ignore.TestCache
This commit is contained in:
parent
50eb968109
commit
8fab7ec5e3
@ -52,14 +52,16 @@ func TestCache(t *testing.T) {
|
||||
|
||||
// Sleep and access, to get some data for clean
|
||||
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
|
||||
c.get("true")
|
||||
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
|
||||
// "false" was accessed 200 ms ago, "true" was accessed 100 ms ago.
|
||||
// "false" was accessed ~600 ms ago, "true" was accessed ~100 ms ago.
|
||||
// This should clean out "false" but not "true"
|
||||
|
||||
c.clean(150 * time.Millisecond)
|
||||
c.clean(300 * time.Millisecond)
|
||||
|
||||
// Same values should exist
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user