Merge pull request #2545 from ermshiperete/Xamarin-24974
[mono.git] / mcs / class / corlib / Test / System.Runtime.CompilerServices / TaskAwaiterTest.cs
index dc127b46404a264f335114b15730bc160b919416..57b1d2c27642c1dafc45d854a7ccf92f086f1cee 100644 (file)
@@ -248,6 +248,7 @@ namespace MonoTests.System.Runtime.CompilerServices
                        return res.Result;
                }
 
+#if !MOBILE_STATIC
                [Test]
                public void FinishedTaskOnCompleted ()
                {
@@ -272,6 +273,8 @@ namespace MonoTests.System.Runtime.CompilerServices
                        Assert.AreEqual (Thread.CurrentThread.IsBackground, mres2.WaitOne (2000), "#2");;
                }
 
+#endif
+
                [Test]
                public void CompletionOnSameCustomSynchronizationContext ()
                {
@@ -368,7 +371,10 @@ namespace MonoTests.System.Runtime.CompilerServices
                public void NestedLeakingSynchronizationContext ()
                {
                        var sc = SynchronizationContext.Current;
-                       Assert.IsTrue (NestedLeakingSynchronizationContext_MainAsync (sc).Wait (5000), "#1");
+                       if (sc == null)
+                               Assert.IsTrue (NestedLeakingSynchronizationContext_MainAsync (sc).Wait (5000), "#1");
+                       else
+                               Assert.Ignore ("NestedSynchronizationContext may never complete on custom context");
                }
 
                static async Task NestedLeakingSynchronizationContext_MainAsync (SynchronizationContext sc)