diff options
author | Rolf Bjarne Kvinge <rolf@xamarin.com> | 2018-04-11 16:35:22 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2018-04-13 15:26:58 +0300 |
commit | c6a8c0e38afab1ef175598d3533c237e4fcca847 (patch) | |
tree | e7577c85f56f5b851c4eae4c41af1a99bcad6c4d | |
parent | c2e1021ed00ba915255ba78f23758c50982a1713 (diff) |
[System.Net.Http] Use '*' as the host instead of '+' in the tests. Fixes xamarin/maccore#673.
Use '*' as the host instead of '+' in the tests.
The behavior should be the same, just faster, because '+' will fail to resolve
("Could not resolve host '+'"), and we'll fall back to the same behavior as
'*': https://github.com/mono/mono/blob/5128cce2dcd097aa4e7b86dd3b56e833c15a9ff0/mcs/class/System/System.Net/EndPointManager.cs#L83-L96
The problem arises when failing to resolve '+' takes a long time: on some of
our bots it takes 5-10 seconds. This adds up quickly since the tests try many
times, effectively increasing a test run from 1-2 seconds to 30+ minutes.
Fixes https://github.com/xamarin/maccore/issues/673.
-rw-r--r-- | mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs index c51ba6818ba..93e1ed4bb08 100644 --- a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs +++ b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs @@ -1443,7 +1443,7 @@ namespace MonoTests.System.Net.Http HttpListener CreateListener (Action<HttpListenerContext> contextAssert, int port) { var l = new HttpListener (); - l.Prefixes.Add (string.Format ("http://+:{0}/", port)); + l.Prefixes.Add (string.Format ("http://*:{0}/", port)); l.Start (); AddListenerContext(l, contextAssert); |