Imported Upstream version 4.8.0.309

Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-10 13:04:39 +00:00
parent ee1447783b
commit 94b2861243
4912 changed files with 390737 additions and 49310 deletions

View File

@@ -1 +1 @@
668e863b5cc055feed1a132c8bc42e8fb00e586f
b747e0dd0164e0fc6e98da731bc02b49911c94ef

View File

@@ -1084,6 +1084,27 @@ namespace MonoTests.System.Diagnostics
Assert.Fail ();
}
}
[Test]
[NUnit.Framework.Category ("MobileNotWorking")]
public void TestExitedRaisedTooSoon ()
{
if (!RunningOnUnix)
Assert.Ignore ("using sleep command, only available on unix");
int sleeptime = 5;
using (Process p = Process.Start("sleep", sleeptime.ToString ())) {
ManualResetEvent mre = new ManualResetEvent (false);
p.EnableRaisingEvents = true;
p.Exited += (sender, e) => {
mre.Set ();
};
Assert.IsFalse (mre.WaitOne ((sleeptime - 2) * 1000), "Exited triggered before the process returned");
}
}
#endif // MONO_FEATURE_PROCESS_START
}
}