diff options
author | Rolf Bjarne Kvinge <rolf@xamarin.com> | 2016-09-27 14:13:38 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2016-09-27 14:13:38 +0300 |
commit | e6536dd5e118a16cdca12840d6529ef9d01aaaad (patch) | |
tree | e998dac34514397f2f97beb16e1a2f10848c829d /mcs/build | |
parent | 59b6fde1b375e82de1a62ee772c1808cd379a53c (diff) |
[System*] Throw a PlatformNotSupported exception when using the networking stack on watchOS. (#3606)
* [System] Fix line endings for a few files.
Best reviewed by not showing whitespace changes (should be empty diff in that case).
* [System] Fix potential crash in CookieParserTests.
Socket.EndAccept can throw an exception, which will crash the process if it
happens on a threadpool. So handle any exceptions when calling
Socket.EndAccept, and propagate those exceptions out of any threadpool code.
* [System.Net.Http] Throw a PlatformNotSupported exception when using HttpClientHandler on watchOS.
* [System.Net.Http] Tweak tests after watchOS API change.
Unfortunately the [ExpectedException] attribute can't be put on an entire
class, so remove the [Category ("RequiresBSDSockets")] attribute on the class
and instead decorate each test with an [ExpectedException] attribute.
* [System] Extract the HttpListenerResponseHelper class to a separate file.
Extract the HttpListenerResponseHelper class to a separate file so that it's
easier to replace the HttpListenerResponse implementation by using a different
file.
* [System] Throw a PlatformNotSupported exception when using the networking stack on watchOS.
* [System] Tweak tests after watchOS API changes.
Unfortunately the [ExpectedException] attribute can't be put on an entire
class, so remove the [Category ("RequiresBSDSockets")] attribute on the class
and instead decorate each test with an [ExpectedException] attribute.
* [System] Fix potential crash in SocketAcceptAsyncTest.
Fix potential crash in SocketAcceptAsyncTest by catching any exceptions in
code executed on the threadpool so that we never end up with unhandled
exceptions (which may terminate the process).
* [System] Avoid logic in SetUp attributes in tests.
Any type of exception in [SetUp] attributes causes all tests to fail with that
exception.
This even happens for tests that do not need the logic in the [SetUp]
attribute.
So rewrite tests a bit to not use [SetUp] when we can reasonably avoid it, and
instead instantiate class-level variables on first use. This ensures that any
exceptions that occur when initializing those variables are attributed to the
corresponding test, and not all of them.
* [System] Make exception handler (for test) catch more exceptions to avoid unhandled exceptions causing process termination.
* [System] Remove Obsolete attribute on API that throws PNSE.
Diffstat (limited to 'mcs/build')
-rw-r--r-- | mcs/build/profiles/monotouch_watch.make | 1 | ||||
-rw-r--r-- | mcs/build/profiles/monotouch_watch_runtime.make | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/mcs/build/profiles/monotouch_watch.make b/mcs/build/profiles/monotouch_watch.make index 0242c20bf51..02c934b62e6 100644 --- a/mcs/build/profiles/monotouch_watch.make +++ b/mcs/build/profiles/monotouch_watch.make @@ -1,6 +1,7 @@ include $(topdir)/build/profiles/monotouch.make PROFILE_MCS_FLAGS += \ + -d:FEATURE_NO_BSD_SOCKETS \ -d:MONOTOUCH_WATCH NO_THREAD_ABORT=1 diff --git a/mcs/build/profiles/monotouch_watch_runtime.make b/mcs/build/profiles/monotouch_watch_runtime.make index 7b3eb80a551..cb6bf304b99 100644 --- a/mcs/build/profiles/monotouch_watch_runtime.make +++ b/mcs/build/profiles/monotouch_watch_runtime.make @@ -1,6 +1,7 @@ include $(topdir)/build/profiles/monotouch_runtime.make PROFILE_MCS_FLAGS += \ + -d:FEATURE_NO_BSD_SOCKETS \ -d:MONOTOUCH_WATCH NO_THREAD_ABORT=1 |