зеркало из https://github.com/mono/mono.git
[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
'*': 5128cce2dc/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.
This commit is contained in:
Родитель
13aa6b7199
Коммит
99a992605f
|
@ -1461,7 +1461,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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче