diff options
author | monojenkins <jo.shields+jenkins@xamarin.com> | 2016-01-29 17:50:15 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2016-01-29 17:50:15 +0300 |
commit | 02d4680c096b6fc343fbe6efd164e265ea319ffe (patch) | |
tree | b1a4105d47ce9cdb3559f89887bef591d7bbaba5 /mcs/class/System.Web.Services/Test | |
parent | 5bb760e65fa5e793f33d6586d0241fa9ac6f53fc (diff) | |
parent | 08aa9adece3e549b85d9cd9551f6bbfda1f33564 (diff) |
Merge pull request #2522 from ludovic-henry/test-socketresponder-task
[SocketResponder] Use Task instead of Thread + Use explicit delegate so it appears in stacktraces
Diffstat (limited to 'mcs/class/System.Web.Services/Test')
-rwxr-xr-x | mcs/class/System.Web.Services/Test/System.Web.Services.Protocols/SoapHttpClientProtocolTest.cs | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/mcs/class/System.Web.Services/Test/System.Web.Services.Protocols/SoapHttpClientProtocolTest.cs b/mcs/class/System.Web.Services/Test/System.Web.Services.Protocols/SoapHttpClientProtocolTest.cs index 00873070036..0019e05c278 100755 --- a/mcs/class/System.Web.Services/Test/System.Web.Services.Protocols/SoapHttpClientProtocolTest.cs +++ b/mcs/class/System.Web.Services/Test/System.Web.Services.Protocols/SoapHttpClientProtocolTest.cs @@ -51,9 +51,7 @@ namespace MonoTests.System.Web.Services.Protocols public void OutParametersTest () { IPEndPoint localEP = new IPEndPoint (IPAddress.Loopback, 5000); - using (SocketResponder sr = new SocketResponder (localEP, new SocketRequestHandler (OutParametersResponse))) { - sr.Start (); - + using (SocketResponder sr = new SocketResponder (localEP, s => OutParametersResponse (s))) { FooService service = new FooService (); service.Url = "http://" + IPAddress.Loopback.ToString () + ":5000/"; @@ -64,8 +62,6 @@ namespace MonoTests.System.Web.Services.Protocols Assert.AreEqual (0, a, "#A2"); Assert.IsFalse (b, "#A3"); service.Dispose (); - - sr.Stop (); } } @@ -74,9 +70,7 @@ namespace MonoTests.System.Web.Services.Protocols public void FaultTest () { IPEndPoint localEP = new IPEndPoint (IPAddress.Loopback, 5000); - using (SocketResponder sr = new SocketResponder (localEP, new SocketRequestHandler (FaultResponse_Qualified))) { - sr.Start (); - + using (SocketResponder sr = new SocketResponder (localEP, s => FaultResponse_Qualified (s))) { FooService service = new FooService (); service.Url = "http://" + IPAddress.Loopback.ToString () + ":5000/"; try { @@ -99,13 +93,9 @@ namespace MonoTests.System.Web.Services.Protocols Assert.AreEqual ("Failure processing request.", ex.Message, "#A9"); } service.Dispose (); - - sr.Stop (); } - using (SocketResponder sr = new SocketResponder (localEP, new SocketRequestHandler (FaultResponse_Unqualified))) { - sr.Start (); - + using (SocketResponder sr = new SocketResponder (localEP, s => FaultResponse_Unqualified (s))) { FooService service = new FooService (); service.Url = "http://" + IPAddress.Loopback.ToString () + ":5000/"; try { @@ -128,8 +118,6 @@ namespace MonoTests.System.Web.Services.Protocols Assert.AreEqual ("Failure processing request.", ex.Message, "#B9"); } service.Dispose (); - - sr.Stop (); } } |