Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,13 @@ public async Task Dispose_WhileDeleteIsRunning_CancelsCompletionNavigation()
StartFullReset(vm);
await deleteStarted.Task.WaitAsync(TestContext.Current.CancellationToken);

using var disposeStarted = new ManualResetEventSlim();
var disposeStarted = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
var dispose = Task.Run(() =>
{
disposeStarted.Set();
disposeStarted.TrySetResult();
vm.Dispose();
}, TestContext.Current.CancellationToken);
Assert.True(
disposeStarted.Wait(TimeSpan.FromSeconds(10), TestContext.Current.CancellationToken),
"Dispose did not start.");
await disposeStarted.Task.WaitAsync(TestContext.Current.CancellationToken);

releaseDelete.TrySetResult();
await dispose.WaitAsync(TestContext.Current.CancellationToken);
Expand Down
Loading