test: remove redundant HostBuildingCollection workaround (shared lib no longer installs a global frozen logger)
This commit is contained in:
@@ -5,11 +5,9 @@ using Microsoft.Extensions.DependencyInjection;
|
|||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using ZB.MOM.WW.MxGateway.Server;
|
using ZB.MOM.WW.MxGateway.Server;
|
||||||
using ZB.MOM.WW.MxGateway.Server.Dashboard;
|
using ZB.MOM.WW.MxGateway.Server.Dashboard;
|
||||||
using ZB.MOM.WW.MxGateway.Tests.Gateway;
|
|
||||||
|
|
||||||
namespace ZB.MOM.WW.MxGateway.Tests.Gateway.Dashboard;
|
namespace ZB.MOM.WW.MxGateway.Tests.Gateway.Dashboard;
|
||||||
|
|
||||||
[Collection(HostBuildingCollection.Name)]
|
|
||||||
public sealed class DashboardCookieOptionsTests
|
public sealed class DashboardCookieOptionsTests
|
||||||
{
|
{
|
||||||
/// <summary>Verifies that the application configures secure dashboard authentication cookies.</summary>
|
/// <summary>Verifies that the application configures secure dashboard authentication cookies.</summary>
|
||||||
|
|||||||
@@ -4,11 +4,9 @@ using Microsoft.Extensions.DependencyInjection;
|
|||||||
using ZB.MOM.WW.MxGateway.Server;
|
using ZB.MOM.WW.MxGateway.Server;
|
||||||
using ZB.MOM.WW.MxGateway.Server.Dashboard;
|
using ZB.MOM.WW.MxGateway.Server.Dashboard;
|
||||||
using ZB.MOM.WW.MxGateway.Server.Dashboard.Hubs;
|
using ZB.MOM.WW.MxGateway.Server.Dashboard.Hubs;
|
||||||
using ZB.MOM.WW.MxGateway.Tests.Gateway;
|
|
||||||
|
|
||||||
namespace ZB.MOM.WW.MxGateway.Tests.Gateway.Dashboard;
|
namespace ZB.MOM.WW.MxGateway.Tests.Gateway.Dashboard;
|
||||||
|
|
||||||
[Collection(HostBuildingCollection.Name)]
|
|
||||||
public sealed class DashboardHubsRegistrationTests
|
public sealed class DashboardHubsRegistrationTests
|
||||||
{
|
{
|
||||||
/// <summary>Verifies that dashboard build maps all three hubs and token endpoint.</summary>
|
/// <summary>Verifies that dashboard build maps all three hubs and token endpoint.</summary>
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ using ZB.MOM.WW.MxGateway.Server.Metrics;
|
|||||||
|
|
||||||
namespace ZB.MOM.WW.MxGateway.Tests.Gateway;
|
namespace ZB.MOM.WW.MxGateway.Tests.Gateway;
|
||||||
|
|
||||||
[Collection(HostBuildingCollection.Name)]
|
|
||||||
public sealed class GatewayApplicationTests
|
public sealed class GatewayApplicationTests
|
||||||
{
|
{
|
||||||
/// <summary>Verifies that Build maps the live health check endpoint.</summary>
|
/// <summary>Verifies that Build maps the live health check endpoint.</summary>
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
namespace ZB.MOM.WW.MxGateway.Tests.Gateway;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Groups every test that constructs a full gateway host via <c>GatewayApplication.Build</c> into a
|
|
||||||
/// single, non-parallel xUnit collection.
|
|
||||||
///
|
|
||||||
/// <para>
|
|
||||||
/// The shared <c>ZB.MOM.WW.Telemetry.Serilog</c> bootstrap (<c>AddZbSerilog</c>) installs a global
|
|
||||||
/// <see cref="global::Serilog.Log.Logger"/> bootstrap logger on each host build and freezes it during
|
|
||||||
/// <c>builder.Build()</c>. That global is process-wide, so two host builds racing in parallel
|
|
||||||
/// collections interleave on it and the loser throws "The logger is already frozen." Serializing the
|
|
||||||
/// host-building tests (which is the only place a full host is built) removes the race without
|
|
||||||
/// changing any production behaviour — the gateway process only ever builds one host.
|
|
||||||
/// </para>
|
|
||||||
/// </summary>
|
|
||||||
[CollectionDefinition(Name, DisableParallelization = true)]
|
|
||||||
public sealed class HostBuildingCollection
|
|
||||||
{
|
|
||||||
/// <summary>Collection name shared by every host-building test class.</summary>
|
|
||||||
public const string Name = "Gateway host building";
|
|
||||||
}
|
|
||||||
@@ -5,14 +5,12 @@ using Microsoft.Extensions.DependencyInjection;
|
|||||||
using ZB.MOM.WW.MxGateway.Server;
|
using ZB.MOM.WW.MxGateway.Server;
|
||||||
using ZB.MOM.WW.MxGateway.Server.Configuration;
|
using ZB.MOM.WW.MxGateway.Server.Configuration;
|
||||||
using ZB.MOM.WW.MxGateway.Server.Security.Authentication;
|
using ZB.MOM.WW.MxGateway.Server.Security.Authentication;
|
||||||
using ZB.MOM.WW.MxGateway.Tests.Gateway;
|
|
||||||
|
|
||||||
namespace ZB.MOM.WW.MxGateway.Tests.Security.Authentication;
|
namespace ZB.MOM.WW.MxGateway.Tests.Security.Authentication;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tests for <see cref="SqliteAuthStore"/>.
|
/// Tests for <see cref="SqliteAuthStore"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Collection(HostBuildingCollection.Name)]
|
|
||||||
public sealed class SqliteAuthStoreTests : IDisposable
|
public sealed class SqliteAuthStoreTests : IDisposable
|
||||||
{
|
{
|
||||||
private readonly List<TempDatabaseDirectory> _tempDirectories = [];
|
private readonly List<TempDatabaseDirectory> _tempDirectories = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user