// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System;
using System.Threading;
}
[Test]
+ [Ignore ("Incompatible with nunitlite")]
public void FinishedTaskOnCompleted ()
{
var mres = new ManualResetEvent (false);
mres.Set ();
// this will only terminate correctly if the test was not executed from the main thread
- // e.g. Touch.Unit defaults to run tests on the main thread and this will return false
+ // e.g. nunitlite/Touch.Unit defaults to run tests on the main thread and this will return false
Assert.AreEqual (Thread.CurrentThread.IsBackground, mres2.WaitOne (2000), "#2");;
}
public void NestedLeakingSynchronizationContext ()
{
var sc = SynchronizationContext.Current;
- NestedLeakingSynchronizationContext_MainAsync (sc).GetAwaiter ().GetResult ();
+ 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)
}
}
-#endif