[System] Fix tests that regressed in e6536dd.
authorRolf Bjarne Kvinge <rolf@xamarin.com>
Thu, 29 Sep 2016 10:01:49 +0000 (12:01 +0200)
committerRolf Bjarne Kvinge <rolf@xamarin.com>
Thu, 29 Sep 2016 10:01:49 +0000 (12:01 +0200)
commitad6f78afec8fcb01a38e83ba7f4a4ec515b1f808
tree49037e492d2756dc5244f6e50af396974317e8e7
parentae4b2d859a1d9a6df84044c789ba436b1cf127ee
[System] Fix tests that regressed in e6536dd.

* I got confused between [TestFixtureSetup] and [Setup], so fix tests whose
  [Setup] methods were changed/removed to properly clean up after each test
  (using a [TearDown] method) so that the next time the on-demand creation of
  objects works as expected (i.e. objects created in the [Setup] method should
  be created on-demand once for each method instead of once for each class).

* Also fix SocketAcceptAsyncTest, the change to properly catch exceptions on
  background threads was incorrect.
mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs
mcs/class/System/Test/System.Net.Sockets/SocketAcceptAsyncTest.cs
mcs/class/System/Test/System.Net/HttpListenerTest.cs