Skip to content

Commit e8104d9

Browse files
committed
Fixed stability of the test
1 parent 83cfc3c commit e8104d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/DotNext.Tests/Runtime/CompilerServices/SpawningAsyncTaskMethodBuilderTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public static async Task ForkAsyncMethodWithResult()
99
{
1010
using var resetEvent = new ManualResetEventSlim(initialState: false);
1111
var task = Sum(40, 2, Thread.CurrentThread.ManagedThreadId);
12-
resetEvent.Wait(DefaultTimeout);
12+
True(resetEvent.Wait(DefaultTimeout));
1313

1414
Equal(42, await task);
1515

@@ -29,7 +29,7 @@ public static async Task ForkAsyncMethodWithoutResult()
2929
{
3030
using var resetEvent = new ManualResetEventSlim(initialState: false);
3131
var task = CheckThreadId(Thread.CurrentThread.ManagedThreadId);
32-
resetEvent.Wait(DefaultTimeout);
32+
True(resetEvent.Wait(DefaultTimeout));
3333

3434
await task;
3535

@@ -48,7 +48,7 @@ public static async Task CancellationOfSpawnedMethod()
4848
{
4949
using var resetEvent = new ManualResetEventSlim(initialState: false);
5050
var task = CheckThreadId(Thread.CurrentThread.ManagedThreadId, new(true));
51-
resetEvent.Wait(DefaultTimeout);
51+
True(resetEvent.Wait(DefaultTimeout));
5252

5353
await Task.WhenAny(task);
5454
True(task.IsCanceled);

0 commit comments

Comments
 (0)