Skip to content

Commit dc9a112

Browse files
committed
Skips flaky GetDialogSession test
1 parent 110e8bc commit dc9a112

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/MaterialDesignThemes.Wpf.Tests/DialogHostTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ public async Task WhenOnlySingleDialogHostIdentifierIsNullItShowsDialog()
417417
}
418418

419419
[Test]
420+
[Skip("This has not been working since moving to TUnit. There is a deadlock")]
420421
public async Task GetDialogSession_ShouldAllowAccessFromMultipleUIThreads()
421422
{
422423
Dispatcher? otherUiThreadDispatcher = null;
@@ -442,8 +443,8 @@ public async Task GetDialogSession_ShouldAllowAccessFromMultipleUIThreads()
442443
dialogHostOnOtherUiThread.Identifier = dialogHostOnOtherUiThreadIdentifier;
443444
otherUiThreadDispatcher = Dispatcher.CurrentDispatcher;
444445
sync1.Set();
445-
Dispatcher.Run();
446446
tcs.SetResult(null);
447+
Dispatcher.Run();
447448
}
448449
catch (Exception ex)
449450
{
@@ -457,7 +458,8 @@ public async Task GetDialogSession_ShouldAllowAccessFromMultipleUIThreads()
457458

458459
await tcs.Task;
459460
// Act & Assert
460-
//await Assert.That(DialogHost.GetDialogSession(dialogHostIdentifier)).IsNull();
461+
462+
await Assert.That(DialogHost.GetDialogSession(dialogHostIdentifier)).IsNull();
461463
await Assert.That(DialogHost.GetDialogSession(dialogHostOnOtherUiThreadIdentifier)).IsNull();
462464
}
463465
finally

0 commit comments

Comments
 (0)