Imported Upstream version 5.14.0.103

Former-commit-id: 486bd2a74e710211687006431be86dd9c935761f
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-05-25 08:39:07 +00:00
parent c30f196079
commit c34b058d3e
50 changed files with 281 additions and 138 deletions

View File

@ -339,7 +339,6 @@ namespace MonoTests.System.Threading.Tasks
bool result = false;
Func<int, int> func = (i) => {
Assert.IsTrue (Thread.CurrentThread.IsThreadPoolThread);
result = true; return i + 3;
};
@ -445,14 +444,12 @@ namespace MonoTests.System.Threading.Tasks
}
[Test]
[Category ("MacNotWorking")] // Randomly fails - https://bugzilla.xamarin.com/show_bug.cgi?id=51255
public void FromAsync_Completed ()
{
var completed = new CompletedAsyncResult ();
bool? valid = null;
Action<IAsyncResult> end = l => {
Assert.IsFalse (Thread.CurrentThread.IsThreadPoolThread, "#2");
valid = l == completed;
};
Task task = factory.FromAsync (completed, end);
@ -557,7 +554,6 @@ namespace MonoTests.System.Threading.Tasks
factory = new TaskFactory (scheduler);
Task task = factory.FromAsync (result, l => {
Assert.IsTrue (Thread.CurrentThread.IsThreadPoolThread, "#6");
called = true;
}, TaskCreationOptions.AttachedToParent);
@ -582,8 +578,6 @@ namespace MonoTests.System.Threading.Tasks
if ((TaskCreationOptions) c != TaskCreationOptions.AttachedToParent)
Assert.Fail ("#11");
Assert.IsFalse (Thread.CurrentThread.IsThreadPoolThread, "#12");
called2 = true;
var ar = Task.CompletedTask;
b.Invoke (ar);