As discussed in dotnet/corefx#19579
public static IEnumerable<object[]> InvalidPrefix_TestData()
{
// [ActiveIssue()]
if (!PlatfomDetection.IsOSX)
{
yield return new object[] { $"http://{Guid.NewGuid().ToString("N")}/" };
}
}
[Theory]
[MemberData(nameof(InvalidPrefix_TestData))]
public void Add_InvalidPrefixNotStarted_ThrowsHttpListenerExceptionOnStart(string uriPrefix)
{
var listener = new HttpListener();
listener.Prefixes.Add(uriPrefix);
Assert.Equal(1, listener.Prefixes.Count);
Assert.True(listener.Prefixes.Contains(uriPrefix));
Assert.Throws<HttpListenerException>(() => listener.Start());
}
This test fails with mac OSX:
MESSAGE:
Assert.Throws() Failure\nExpected: typeof(System.Net.HttpListenerException)\nActual: (No exception was thrown)
+++++++++++++++++++
STACK TRACE:
at System.Net.Tests.HttpListenerPrefixCollectionTests.Add_InvalidPrefixNotStarted_ThrowsHttpListenerExceptionOnStart(String uriPrefix) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx10.12_debug_prtest/src/System.Net.HttpListener/tests/HttpListenerPrefixCollectionTests.cs:line 264
As discussed in dotnet/corefx#19579
This test fails with mac OSX: