@@ -112,9 +112,9 @@ type Tests() =
112
112
let [<Fact>] ``requireLoad does not unify loads`` () = task {
113
113
cat.Delay <- TimeSpan.FromMilliseconds 50
114
114
let t1 = requireLoad ()
115
- do ! Task.Delay 20
115
+ do ! Task.Delay 10
116
116
test <@ ( 1 , 0 ) = ( cat.Loads, cat.Reloads) @>
117
- do ! Task.Delay 50 // wait for the loaded value to get cached
117
+ do ! Task.Delay 60 // wait for the loaded value to get cached (50 should do, but MacOS CI...)
118
118
let! struct ( _token , state ) = requireLoad ()
119
119
test <@ 2 = state && ( 1 , 1 ) = ( cat.Loads, cat.Reloads) @>
120
120
let! struct ( _token , state ) = t1
@@ -166,7 +166,7 @@ type Tests() =
166
166
test <@ ( 2 , 1 , 1 ) = ( state, cat.Loads, cat.Reloads) @>
167
167
cat.Delay <- TimeSpan.FromMilliseconds 50
168
168
let t3 = requireLoad ()
169
- do ! Task.Delay 10 // Make the main read enter a delay state (of 50 ); ensure readThrough values are expired
169
+ do ! Task.Delay 2 // Make the main read enter a delay state (of 500 ); ensure readThrough values are expired
170
170
cat.Delay <- TimeSpan.FromMilliseconds 75 // Next read picks up the longer delay
171
171
// These reads start after the first read so replace the older value in the cache
172
172
let t1 = loadReadThrough 1
@@ -178,7 +178,7 @@ type Tests() =
178
178
let! struct ( _token , state ) = loadReadThrough 150 // Delay of 75 overlapped with delay of 50 should not have expired the entry
179
179
test <@ ( 4 , 1 , 3 ) = ( state, cat.Loads, cat.Reloads) @> // The newer cache entry won
180
180
cat.Delay <- TimeSpan.FromMilliseconds 10 // Reduce the delay, but we do want to overlap a write
181
- let t4 = loadReadThrough 100 // Delay of 75 in t1/t2 should have aged the read result, so should trigger a read
181
+ let t4 = loadReadThrough 1000 // Delay of 1000 in t1/t2 should have aged the read result, so should trigger a read
182
182
do ! Task.Delay 2
183
183
cat.Delay <- TimeSpan.Zero // no further delays required for the rest of the tests
184
184
0 commit comments