diff --git a/test/Microsoft.AspNet.WebSockets.Client.Test/KestrelWebSocketHelpers.cs b/test/Microsoft.AspNet.WebSockets.Client.Test/KestrelWebSocketHelpers.cs index 5e54941ae4..203e9d2722 100644 --- a/test/Microsoft.AspNet.WebSockets.Client.Test/KestrelWebSocketHelpers.cs +++ b/test/Microsoft.AspNet.WebSockets.Client.Test/KestrelWebSocketHelpers.cs @@ -48,12 +48,13 @@ namespace Microsoft.AspNet.WebSockets.Client.Test config.Set("server.urls", "http://localhost:54321"); var services = HostingServices.Create(CallContextServiceLocator.Locator?.ServiceProvider, config) .BuildServiceProvider(); + var applicationLifetime = services.GetRequiredService(); var context = new HostingContext() { - Services = services, + ApplicationLifetime = applicationLifetime, Configuration = config, - ServerName = "Kestrel", + ServerFactoryLocation = "Kestrel", ApplicationStartup = startup, };