diff --git a/Directory.Packages.props b/Directory.Packages.props index 74927b9f3..600c7b703 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,7 +3,7 @@ true - + @@ -33,7 +33,7 @@ - + diff --git a/src/Http/Wolverine.Http.Tests/Bugs/Bug_using_host_stop.cs b/src/Http/Wolverine.Http.Tests/Bugs/Bug_using_host_stop.cs index 055d4df6b..ff0cdf696 100644 --- a/src/Http/Wolverine.Http.Tests/Bugs/Bug_using_host_stop.cs +++ b/src/Http/Wolverine.Http.Tests/Bugs/Bug_using_host_stop.cs @@ -1,5 +1,4 @@ using Alba; -using JasperFx.CommandLine; using JasperFx.Core.Reflection; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Hosting; @@ -77,8 +76,6 @@ await CreateAlbaHostWithWithFactory() private static async Task CreateAlbaHostWithWithFactory() { - JasperFxEnvironment.AutoStartHost = true; // to start the underlying host - return await AlbaHost.For(x => x.ConfigureServices(ConfigureWolverine)); } diff --git a/src/Http/Wolverine.Http.Tests/IntegrationContext.cs b/src/Http/Wolverine.Http.Tests/IntegrationContext.cs index f8e6ade20..6eb4d6410 100644 --- a/src/Http/Wolverine.Http.Tests/IntegrationContext.cs +++ b/src/Http/Wolverine.Http.Tests/IntegrationContext.cs @@ -4,7 +4,6 @@ using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.OpenApi.Models; -using JasperFx.CommandLine; using Shouldly; using Swashbuckle.AspNetCore.Swagger; using Wolverine.Tracking; @@ -19,11 +18,6 @@ public class AppFixture : IAsyncLifetime public async Task InitializeAsync() { - // Sorry folks, but this is absolutely necessary if you - // use JasperFx for command line processing and want to - // use WebApplicationFactory and/or Alba for integration testing - JasperFxEnvironment.AutoStartHost = true; - // For "integration" test collection (based on this fixture) ApplicationAssembly is WolverineWebApi. // If not set explicitly here other tests may set it to the test assembly causing issues with endpoints discovery. JasperFxOptions.RememberedApplicationAssembly = typeof(WolverineWebApi.Program).Assembly; diff --git a/src/Persistence/EfCoreTests.MultiTenancy/MultiTenancyCompliance.cs b/src/Persistence/EfCoreTests.MultiTenancy/MultiTenancyCompliance.cs index 11c30bd27..547bea79d 100644 --- a/src/Persistence/EfCoreTests.MultiTenancy/MultiTenancyCompliance.cs +++ b/src/Persistence/EfCoreTests.MultiTenancy/MultiTenancyCompliance.cs @@ -1,6 +1,5 @@ using Alba; using IntegrationTests; -using JasperFx.CommandLine; using Marten.Exceptions; using Microsoft.Data.SqlClient; using Microsoft.EntityFrameworkCore; @@ -10,8 +9,6 @@ using SharedPersistenceModels.Items; using SharedPersistenceModels.Orders; using Shouldly; -using Weasel.Postgresql; -using Weasel.SqlServer; using Wolverine; using Wolverine.EntityFrameworkCore; using Wolverine.EntityFrameworkCore.Internals; @@ -38,7 +35,6 @@ public abstract class MultiTenancyCompliance : IAsyncLifetime, IWolverineExtensi protected MultiTenancyCompliance(DatabaseEngine engine) { - JasperFxEnvironment.AutoStartHost = true; TestingOverrides.Extension = this; _engine = engine; diff --git a/src/Persistence/Polecat/PolecatIncidentService.Tests/IntegrationContext.cs b/src/Persistence/Polecat/PolecatIncidentService.Tests/IntegrationContext.cs index fe31768eb..02dd92184 100644 --- a/src/Persistence/Polecat/PolecatIncidentService.Tests/IntegrationContext.cs +++ b/src/Persistence/Polecat/PolecatIncidentService.Tests/IntegrationContext.cs @@ -1,6 +1,4 @@ using Alba; -using JasperFx; -using JasperFx.CommandLine; using Microsoft.Extensions.DependencyInjection; using Polecat; using Wolverine; @@ -17,8 +15,6 @@ public class AppFixture : IAsyncLifetime public async Task InitializeAsync() { - JasperFxEnvironment.AutoStartHost = true; - Host = await AlbaHost.For(x => { x.ConfigureServices(services => diff --git a/src/Samples/Diagnostics/DiagnosticsTests/IntegrationContext.cs b/src/Samples/Diagnostics/DiagnosticsTests/IntegrationContext.cs index 76b39e371..f062df769 100644 --- a/src/Samples/Diagnostics/DiagnosticsTests/IntegrationContext.cs +++ b/src/Samples/Diagnostics/DiagnosticsTests/IntegrationContext.cs @@ -1,8 +1,6 @@ using Alba; using Marten; using Microsoft.Extensions.DependencyInjection; -using JasperFx; -using JasperFx.CommandLine; using Wolverine.Runtime; namespace DiagnosticsTests; @@ -13,11 +11,8 @@ public class AppFixture : IAsyncLifetime public async Task InitializeAsync() { - JasperFxEnvironment.AutoStartHost = true; - // This is bootstrapping the actual application using // its implied Program.Main() set up - Host = await AlbaHost.For(x => { }); } diff --git a/src/Samples/EFCoreSample/ItemService.Tests/end_to_end.cs b/src/Samples/EFCoreSample/ItemService.Tests/end_to_end.cs index 962c03402..78565edfa 100644 --- a/src/Samples/EFCoreSample/ItemService.Tests/end_to_end.cs +++ b/src/Samples/EFCoreSample/ItemService.Tests/end_to_end.cs @@ -1,8 +1,6 @@ using Alba; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; -using JasperFx; -using JasperFx.CommandLine; using Shouldly; using Wolverine.Tracking; @@ -10,11 +8,6 @@ namespace ItemService.Tests; public class end_to_end { - public end_to_end() - { - JasperFxEnvironment.AutoStartHost = true; - } - [Fact] public async Task run_through_the_handler() { diff --git a/src/Samples/EFCoreSample/ItemService.Tests/end_to_end_for_dbcontext_not_integrated_with_outbox.cs b/src/Samples/EFCoreSample/ItemService.Tests/end_to_end_for_dbcontext_not_integrated_with_outbox.cs index ba5c8e092..d4a92494e 100644 --- a/src/Samples/EFCoreSample/ItemService.Tests/end_to_end_for_dbcontext_not_integrated_with_outbox.cs +++ b/src/Samples/EFCoreSample/ItemService.Tests/end_to_end_for_dbcontext_not_integrated_with_outbox.cs @@ -1,8 +1,6 @@ using Alba; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; -using JasperFx; -using JasperFx.CommandLine; using Shouldly; using Wolverine.Tracking; @@ -10,11 +8,6 @@ namespace ItemService.Tests; public class end_to_end_for_dbcontext_not_integrated_with_outbox { - public end_to_end_for_dbcontext_not_integrated_with_outbox() - { - JasperFxEnvironment.AutoStartHost = true; - } - [Fact] public async Task run_through_the_handler() { diff --git a/src/Samples/IncidentService/IncidentService.Tests/IntegrationContext.cs b/src/Samples/IncidentService/IncidentService.Tests/IntegrationContext.cs index fced61c89..5866fdee5 100644 --- a/src/Samples/IncidentService/IncidentService.Tests/IntegrationContext.cs +++ b/src/Samples/IncidentService/IncidentService.Tests/IntegrationContext.cs @@ -1,9 +1,6 @@ using Alba; -using Alba.Security; using Marten; using Microsoft.Extensions.DependencyInjection; -using JasperFx; -using JasperFx.CommandLine; using Wolverine; using Wolverine.Runtime; using Wolverine.Tracking; @@ -20,8 +17,6 @@ public class AppFixture : IAsyncLifetime public async Task InitializeAsync() { - JasperFxEnvironment.AutoStartHost = true; - // This is bootstrapping the actual application using // its implied Program.Main() set up Host = await AlbaHost.For(x => diff --git a/src/Samples/Middleware/AppWithMiddleware.Tests/try_out_the_middleware.cs b/src/Samples/Middleware/AppWithMiddleware.Tests/try_out_the_middleware.cs index 73421e4e2..e87cf6f19 100644 --- a/src/Samples/Middleware/AppWithMiddleware.Tests/try_out_the_middleware.cs +++ b/src/Samples/Middleware/AppWithMiddleware.Tests/try_out_the_middleware.cs @@ -3,8 +3,6 @@ using Marten; using Microsoft.Extensions.DependencyInjection; using NSubstitute; -using JasperFx; -using JasperFx.CommandLine; using Shouldly; using Wolverine; using Xunit.Abstractions; @@ -17,9 +15,6 @@ public class try_out_the_middleware public try_out_the_middleware(ITestOutputHelper output) { - // Boo! I blame the AspNetCore team for this one though - JasperFxEnvironment.AutoStartHost = true; - _output = output; } diff --git a/src/Samples/MultiTenantedTodoService/MultiTenantedTodoWebService.Tests/end_to_end.cs b/src/Samples/MultiTenantedTodoService/MultiTenantedTodoWebService.Tests/end_to_end.cs index 4d24edc78..a8f8ce1d0 100644 --- a/src/Samples/MultiTenantedTodoService/MultiTenantedTodoWebService.Tests/end_to_end.cs +++ b/src/Samples/MultiTenantedTodoService/MultiTenantedTodoWebService.Tests/end_to_end.cs @@ -3,8 +3,6 @@ using Marten; using Microsoft.Extensions.DependencyInjection; using Npgsql; -using JasperFx; -using JasperFx.CommandLine; using Shouldly; using Weasel.Postgresql; using Weasel.Postgresql.Migrations; @@ -35,10 +33,6 @@ public async Task InitializeAsync() await createDatabaseIfNotExists(conn, "tenant2"); await createDatabaseIfNotExists(conn, "tenant3"); - // Sorry folks, this is a hidden trap - // I blame the AspNetCore team... - JasperFxEnvironment.AutoStartHost = true; - var securityStub = new JwtSecurityStub() .With("claim", "value"); diff --git a/src/Samples/TestHarness/BankingService.Tests/AlbaTestHarness.cs b/src/Samples/TestHarness/BankingService.Tests/AlbaTestHarness.cs index 88070d91a..81987df7d 100644 --- a/src/Samples/TestHarness/BankingService.Tests/AlbaTestHarness.cs +++ b/src/Samples/TestHarness/BankingService.Tests/AlbaTestHarness.cs @@ -2,8 +2,6 @@ using JasperFx.Core; using JasperFx.Core.Reflection; using Microsoft.Extensions.DependencyInjection; -using JasperFx; -using JasperFx.CommandLine; using Shouldly; using Wolverine.Tracking; @@ -16,7 +14,6 @@ public class AlbaTestHarness [Fact] public async Task run_end_to_end_with_stub_services() { - JasperFxEnvironment.AutoStartHost = true; using var host = await AlbaHost.For(builder => { builder.ConfigureServices(services => services.AddSingleton()); diff --git a/src/Samples/TodoWebService/TodoWebServiceTests/end_to_end.cs b/src/Samples/TodoWebService/TodoWebServiceTests/end_to_end.cs index a9f831a56..9a7dfa830 100644 --- a/src/Samples/TodoWebService/TodoWebServiceTests/end_to_end.cs +++ b/src/Samples/TodoWebService/TodoWebServiceTests/end_to_end.cs @@ -2,8 +2,6 @@ using Marten; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; -using JasperFx; -using JasperFx.CommandLine; using Shouldly; using TodoWebService; using Wolverine.Tracking; @@ -16,10 +14,6 @@ public class end_to_end : IAsyncLifetime public async Task InitializeAsync() { - // Sorry folks, this is a hidden trap - // I blame the AspNetCore team... - JasperFxEnvironment.AutoStartHost = true; - _host = await AlbaHost.For(); // Wiping out any leftover data in the database diff --git a/src/Transports/Kafka/Wolverine.Kafka.Tests/batch_processing_with_kafka.cs b/src/Transports/Kafka/Wolverine.Kafka.Tests/batch_processing_with_kafka.cs index 150934a1b..425dc00b4 100644 --- a/src/Transports/Kafka/Wolverine.Kafka.Tests/batch_processing_with_kafka.cs +++ b/src/Transports/Kafka/Wolverine.Kafka.Tests/batch_processing_with_kafka.cs @@ -1,6 +1,4 @@ using Alba; -using JasperFx; -using JasperFx.CommandLine; using JasperFx.Core; using Shouldly; using Wolverine.Tracking; @@ -13,8 +11,6 @@ public class batch_processing_with_kafka [Fact] public async Task end_to_end() { - JasperFxEnvironment.AutoStartHost = true; - await using var host = await AlbaHost.For(_ => {}); IScenarioResult result = null!;