fix(dashboard): guard stale-session batches inside the renderer dispatch; register IDashboardSessionEventSubscriber
This commit is contained in:
@@ -45,4 +45,23 @@ public sealed class DashboardHubsRegistrationTests
|
||||
.GetRequiredService<DashboardHubConnectionFactory>();
|
||||
Assert.NotNull(factory);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The publish and in-process subscribe faces of the event mirror must resolve to
|
||||
/// one instance: two would leave the session-details page reading a mirror the
|
||||
/// session pipeline never publishes to, and the viewer gate would never open.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Build_WhenDashboardEnabled_ResolvesBothEventMirrorInterfacesToOneInstance()
|
||||
{
|
||||
await using WebApplication app = GatewayApplication.Build([]);
|
||||
|
||||
IDashboardEventBroadcaster broadcaster = app.Services.GetRequiredService<IDashboardEventBroadcaster>();
|
||||
IDashboardSessionEventSubscriber subscriber = app.Services
|
||||
.GetRequiredService<IDashboardSessionEventSubscriber>();
|
||||
|
||||
Assert.Same(broadcaster, subscriber);
|
||||
Assert.Same(app.Services.GetRequiredService<DashboardEventBroadcaster>(), broadcaster);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user