Fix tests to use dynamic ports (#3177)

This commit is contained in:
BrennanConroy 2018-10-22 20:32:53 -07:00 committed by GitHub
parent 4a3d1c689f
commit 2bea4608fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -45,7 +45,8 @@ namespace Microsoft.AspNetCore.SignalR.Tests
Assert.Equal("Unable to find the required services. Please add all the required services by calling " +
"'IServiceCollection.AddSignalR' inside the call to 'ConfigureServices(...)' in the application startup code.", ex.Message);
});
})
.UseUrls("http://127.0.0.1:0");
using (var host = builder.Build())
{
@ -137,6 +138,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests
{
app.UseSignalR(options => configure(options));
})
.UseUrls("http://127.0.0.1:0")
.Build();
}
}