From a00de00d95ecdfbb242ad05fd72cee605f717f5a Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Thu, 11 Aug 2016 09:54:55 +0200 Subject: [PATCH] [mcs] More reliable tests --- mcs/tests/test-iter-23.cs | 4 +++- mcs/tests/ver-il-net_4_x.xml | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mcs/tests/test-iter-23.cs b/mcs/tests/test-iter-23.cs index cf1b1813591..3dd524c4960 100644 --- a/mcs/tests/test-iter-23.cs +++ b/mcs/tests/test-iter-23.cs @@ -5,6 +5,7 @@ using System.Threading; class X { static ManualResetEvent dispose = new ManualResetEvent (false); + static ManualResetEvent wait = new ManualResetEvent (false); static IEnumerable GetIt2 () { @@ -15,7 +16,7 @@ class X static int Delay () { dispose.Set (); - Thread.Sleep (10); + wait.WaitOne (); return 1; } @@ -25,6 +26,7 @@ class X ThreadPool.QueueUserWorkItem (l => { dispose.WaitOne (); ((IDisposable) e).Dispose (); + wait.Set (); }); if (!e.MoveNext ()) diff --git a/mcs/tests/ver-il-net_4_x.xml b/mcs/tests/ver-il-net_4_x.xml index 91d6a9d8ebc..33a932710a4 100644 --- a/mcs/tests/ver-il-net_4_x.xml +++ b/mcs/tests/ver-il-net_4_x.xml @@ -69368,7 +69368,7 @@ - 28 + 32 141 @@ -69377,7 +69377,7 @@ 7 - 12 + 23 @@ -69402,7 +69402,7 @@ - 29 + 40 7 -- 2.25.1