[interp] disable some tests that fail on CI only
[mono.git] / mono / tests / threadpool-exceptions1.cs
index 3032de61809e676db04c583958a578ecfe10448c..37809bc947901d73ddd5b5feb537558300331521 100644 (file)
@@ -2,18 +2,27 @@ using System;
 using System.Threading;
 
 class Test {
+       static object monitor;
+
        static int Main ()
        {
+               monitor = new object ();
                AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
                ThreadPool.QueueUserWorkItem ((a) => {
                        throw new Exception ("From the threadpoool");
                        });
+               lock (monitor) {
+                       Monitor.Wait (monitor);
+               }
                Thread.Sleep (1000);
                return 1;
        }
 
        static void OnUnhandledException (object sender, UnhandledExceptionEventArgs e)
        {
+               lock (monitor) {
+                       Monitor.Pulse (monitor);
+               }
                Environment.Exit (0);
        }
 }