Skip to content

Server_RegisterUnavailablePrefix_ThrowsActionableHttpSysException #26156

@Tratcher

Description

@Tratcher

This test now fails consistently on Helix because helix tests run as admin where the test was expecting an access-denied error. The test needs to be redesigned or removed.

#20718 (comment)

public void Server_RegisterUnavailablePrefix_ThrowsActionableHttpSysException()
{
var options = new HttpSysOptions();
options.UrlPrefixes.Add(UrlPrefix.Create("http", "example.org", "8080", ""));
var listener = new HttpSysListener(options, new LoggerFactory());
var exception = Assert.Throws<HttpSysException>(() => listener.Start());

  Failed Microsoft.AspNetCore.Server.HttpSys.Listener.ServerTests.Server_RegisterUnavailablePrefix_ThrowsActionableHttpSysException [8 ms]
  Error Message:
   Assert.Throws() Failure
Expected: typeof(Microsoft.AspNetCore.Server.HttpSys.HttpSysException)
Actual:   (No exception was thrown)
  Stack Trace:
     at Microsoft.AspNetCore.Server.HttpSys.Listener.ServerTests.Server_RegisterUnavailablePrefix_ThrowsActionableHttpSysException() in /_/src/Servers/HttpSys/test/FunctionalTests/Listener/ServerTests.cs:line 136

Metadata

Metadata

Assignees

Labels

area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-httpsystest-failure

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions