diff --git a/test/DynamoCoreWpfTests/Utility/DispatcherUtil.cs b/test/DynamoCoreWpfTests/Utility/DispatcherUtil.cs
index 529c0a7d3f0..3ded9cbe004 100644
--- a/test/DynamoCoreWpfTests/Utility/DispatcherUtil.cs
+++ b/test/DynamoCoreWpfTests/Utility/DispatcherUtil.cs
@@ -17,6 +17,8 @@ public static class DispatcherUtil
public static void DoEvents()
{
var frame = new DispatcherFrame();
+
+ // Invoke with the lowest priority possible so that other tasks (with higher priority) can get a chance to finish.
Dispatcher.CurrentDispatcher.Invoke(DispatcherPriority.SystemIdle,
new DispatcherOperationCallback(ExitFrame), frame);
Dispatcher.PushFrame(frame);
@@ -29,7 +31,7 @@ public static void DoEvents()
/// When check returns true, the even loop is stopped.
public static void DoEventsLoop(Func check = null)
{
- const int max_count = 20;
+ const int max_count = 200;
int count = 0;
while (true)
@@ -44,7 +46,7 @@ public static void DoEventsLoop(Func check = null)
}
DispatcherUtil.DoEvents();
- Thread.Sleep(1000);
+ Thread.Sleep(100);
count++;
}
}
diff --git a/test/DynamoCoreWpfTests/ViewExtensions/NodeManipulatorExtensionTests.cs b/test/DynamoCoreWpfTests/ViewExtensions/NodeManipulatorExtensionTests.cs
index 3586ba95ac4..22a1499250e 100644
--- a/test/DynamoCoreWpfTests/ViewExtensions/NodeManipulatorExtensionTests.cs
+++ b/test/DynamoCoreWpfTests/ViewExtensions/NodeManipulatorExtensionTests.cs
@@ -30,6 +30,8 @@ public class NodeManipulatorExtensionTests : DynamoTestUIBase
[SetUp]
public virtual void Start()
{
+ // Forcing the dispatcher to execute all of its tasks within these tests causes crashes in Helix.
+ // For now just skip it.
SkipDispatcherFlush = true;
base.Start();
}