Skip to content

Commit 084f55c

Browse files
committed
Add delay before yielding in ForwardTimeAsync to prevent timer issues
1 parent c5bd0d0 commit 084f55c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/IcedTasks.Tests/Expect.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ type ManualTimeProviderExtensions =
156156
do! Task.Yield()
157157
this.Advance(time)
158158
//https://github.com/dotnet/runtime/issues/85326
159-
// I'm not sure why we have to do this many yields, but sometimes the timer doesn't fire and the test run forever.
159+
// I'm not sure why we have to do this many yields or delays, but sometimes the timer doesn't fire and the test run forever.
160160
// I've spent way too much time on this already.
161+
do! Task.Delay(150)
162+
161163
do!
162164
Task.yieldMany (
163165
Int32.MaxValue

0 commit comments

Comments
 (0)