浏览代码

Fixes #2017. Sometimes I get fails with the TestAddManyTimeouts unit test. (#2018)

* Fixes #2017. Sometimes I get fails with the TestAddManyTimeouts unit test.

* Fixes #2013. Starting having MainLoopTests.InvokeLeakTest failure.
BDisp 2 年之前
父节点
当前提交
0f9abea9e4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      UnitTests/ApplicationTests.cs

+ 2 - 2
UnitTests/ApplicationTests.cs

@@ -1301,7 +1301,7 @@ namespace Terminal.Gui.Core {
 					var myi = i;
 
 					Task.Run (() => {
-						Task.Delay (100).Wait ();
+						Thread.Sleep (100);
 
 						// each thread registers lots of 1s timeouts
 						for (int j = 0; j < numberOfTimeoutsPerThread; j++) {
@@ -1318,7 +1318,7 @@ namespace Terminal.Gui.Core {
 						if (myi == 0) {
 
 							// let the timeouts run for a bit
-							Task.Delay (5000).Wait ();
+							Thread.Sleep (5000);
 
 							// then tell the application to quit
 							Application.MainLoop.Invoke (() => Application.RequestStop ());