Skip to content

Commit

Permalink
Improved test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sakno committed Jul 10, 2024
1 parent 2e5c5e2 commit f80fa5e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/DotNext.Tests/Threading/AsyncTriggerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ public static async Task SignalAndWait()

await task2;
}

[Fact]
public static async Task SignalAndWaitWithTimeout()
{
using var trigger = new AsyncTrigger();

var task1 = trigger.WaitAsync();
var task2 = trigger.SignalAndWaitAsync(false, true, DefaultTimeout);

await task1;
False(task2.IsCompleted);

True(trigger.Signal());

True(await task2);
}

[Fact]
public static async Task SignalEmptyQueue()
Expand Down

0 comments on commit f80fa5e

Please sign in to comment.