Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,10 @@ private TestServer CreateTestServer(
});
}

public async ValueTask DisposeAsync()
public override async ValueTask DisposeAsync()
{
await base.DisposeAsync();

if (_opaHandle is not null)
{
await _opaHandle.DisposeAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

namespace HotChocolate.AspNetCore.Tests.Utilities;

public abstract class ServerTestBase(TestServerFactory serverFactory) : IClassFixture<TestServerFactory>
public abstract class ServerTestBase(TestServerFactory serverFactory)
: IClassFixture<TestServerFactory>
, IAsyncDisposable
{
protected TestServerFactory ServerFactory { get; } = serverFactory;

Expand Down Expand Up @@ -164,6 +166,16 @@ protected virtual TestServer CreateServer(
.UseEndpoints(endpoints => configureConventions?.Invoke(endpoints)));
}

/// <summary>
/// Disposes the servers the current test created.
/// </summary>
public virtual ValueTask DisposeAsync()
{
ServerFactory.DisposeServers();

return ValueTask.CompletedTask;
}

[DirectiveType(DirectiveLocation.Subscription)]
public class Foo
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Action<IServiceCollection> configureServices,
Action<IApplicationBuilder> configureApplication)
{
var builder = new WebHostBuilder()

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.Transport.InMemory.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.Transport.InMemory.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.CodeGeneration.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.CodeGeneration.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Transport.Http.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Transport.Http.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Utilities.Introspection.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Utilities.Introspection.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.Transport.WebSocket.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.Transport.WebSocket.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Transport.Sockets.Client.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Transport.Sockets.Client.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.Transport.Http.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.Transport.Http.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Data.Sorting.InMemory.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Data.Sorting.InMemory.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.CodeGeneration.Razor.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.CodeGeneration.Razor.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.AspNetCore.Authorization.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.AspNetCore.Authorization.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.AspNetCore.Authorization.Opa.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.AspNetCore.Authorization.Opa.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.CodeGeneration.CSharp.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.CodeGeneration.CSharp.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Diagnostics.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Diagnostics.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.AspNetCore.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)

Check warning on line 16 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.AspNetCore.Tests

'WebHostBuilder' is obsolete: 'WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit https://aka.ms/aspnet/deprecate/004.' (https://aka.ms/aspnet/deprecate/004)
.Configure(configureApplication)
.ConfigureServices(services =>
{
Expand All @@ -21,16 +21,23 @@
configureServices(services);
});

var server = new TestServer(builder);

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.Transport.InMemory.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.Transport.InMemory.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.CodeGeneration.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.CodeGeneration.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Transport.Http.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Transport.Http.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Utilities.Introspection.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Utilities.Introspection.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.Transport.WebSocket.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.Transport.WebSocket.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Transport.Sockets.Client.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Transport.Sockets.Client.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.Transport.Http.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.Transport.Http.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Data.Sorting.InMemory.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Data.Sorting.InMemory.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.CodeGeneration.Razor.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.CodeGeneration.Razor.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.AspNetCore.Authorization.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.AspNetCore.Authorization.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.AspNetCore.Authorization.Opa.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.AspNetCore.Authorization.Opa.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.CodeGeneration.CSharp.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run StrawberryShake.CodeGeneration.CSharp.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Diagnostics.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.Diagnostics.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.AspNetCore.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)

Check warning on line 24 in src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerFactory.cs

View workflow job for this annotation

GitHub Actions / Run HotChocolate.AspNetCore.Tests

'TestServer.TestServer(IWebHostBuilder)' is obsolete: 'IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.' (https://aka.ms/aspnet/deprecate/008)
_instances.Add(server);
return server;
}

public void Dispose()
public void Dispose() => DisposeServers();

/// <summary>
/// Disposes and releases every server this factory has created so far.
/// </summary>
public void DisposeServers()
{
foreach (var testServer in _instances)
{
testServer.Dispose();
}

_instances.Clear();
}
}
Loading