From bd46ba12707439a69a255b66de1b9070b4a53216 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Mon, 15 Jun 2026 09:52:07 -0400 Subject: [PATCH] fix(test): drop removed logger arg from GalaxyRepositoryGrpcService test call sites; docs: STA phrasing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the trailing NullLogger.Instance argument from all four CreateService/inline constructions in GalaxyRepositoryGrpcServiceTests and GalaxyFilterInputSafetyTests, matching the now-4-param constructor after the dead logger parameter was removed in 0032d2d. Also drop the now-unused Microsoft.Extensions.Logging.Abstractions using from both files. Rephrase the ยง5 STA blurb in docs/AlarmClientDiscovery.md: GatewayAlarmMonitor routes polling *through* the worker's StaRuntime (which owns the STA pump) rather than owning the pump itself. --- docs/AlarmClientDiscovery.md | 5 ++--- .../Galaxy/GalaxyFilterInputSafetyTests.cs | 4 +--- .../Gateway/Grpc/GalaxyRepositoryGrpcServiceTests.cs | 10 +++------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/docs/AlarmClientDiscovery.md b/docs/AlarmClientDiscovery.md index ba1e4ca..e03ac9d 100644 --- a/docs/AlarmClientDiscovery.md +++ b/docs/AlarmClientDiscovery.md @@ -770,9 +770,8 @@ on cross-apartment marshaling unless the host STA pumps Win32 messages. The smoke test sidesteps this by setting `pollIntervalMilliseconds=0` (Timer disabled) and driving `PollOnce` manually from the test's STA. Production alarm polling was wired up -through the worker's `StaRuntime` via `GatewayAlarmMonitor`, which -owns the STA pump and drives alarm subscriptions through the worker -IPC path. This item is resolved; the wnwrap consumer's `PollOnce` +through `GatewayAlarmMonitor`, which routes polling through the +worker's `StaRuntime` (the STA pump owner) via the worker IPC path. This item is resolved; the wnwrap consumer's `PollOnce` is no longer invoked directly in production. ### Capture summary diff --git a/src/ZB.MOM.WW.MxGateway.Tests/Galaxy/GalaxyFilterInputSafetyTests.cs b/src/ZB.MOM.WW.MxGateway.Tests/Galaxy/GalaxyFilterInputSafetyTests.cs index ab18465..f434fd6 100644 --- a/src/ZB.MOM.WW.MxGateway.Tests/Galaxy/GalaxyFilterInputSafetyTests.cs +++ b/src/ZB.MOM.WW.MxGateway.Tests/Galaxy/GalaxyFilterInputSafetyTests.cs @@ -1,6 +1,5 @@ using System.Diagnostics; using Grpc.Core; -using Microsoft.Extensions.Logging.Abstractions; using ZB.MOM.WW.MxGateway.Contracts.Proto.Galaxy; using ZB.MOM.WW.MxGateway.Server.Dashboard; using ZB.MOM.WW.MxGateway.Server.Galaxy; @@ -266,8 +265,7 @@ public sealed class GalaxyFilterInputSafetyTests new ZB.MOM.WW.MxGateway.Server.Galaxy.GalaxyRepository(options), new StubGalaxyHierarchyCache(entry), new GalaxyDeployNotifier(), - new GatewayRequestIdentityAccessor(), - NullLogger.Instance); + new GatewayRequestIdentityAccessor()); } private static GalaxyHierarchyCacheEntry CreateEntry(IReadOnlyList objects) diff --git a/src/ZB.MOM.WW.MxGateway.Tests/Gateway/Grpc/GalaxyRepositoryGrpcServiceTests.cs b/src/ZB.MOM.WW.MxGateway.Tests/Gateway/Grpc/GalaxyRepositoryGrpcServiceTests.cs index ee05cb9..cb0b036 100644 --- a/src/ZB.MOM.WW.MxGateway.Tests/Gateway/Grpc/GalaxyRepositoryGrpcServiceTests.cs +++ b/src/ZB.MOM.WW.MxGateway.Tests/Gateway/Grpc/GalaxyRepositoryGrpcServiceTests.cs @@ -1,5 +1,4 @@ using Grpc.Core; -using Microsoft.Extensions.Logging.Abstractions; using ZB.MOM.WW.MxGateway.Contracts.Proto.Galaxy; using ZB.MOM.WW.MxGateway.Server.Dashboard; using ZB.MOM.WW.MxGateway.Server.Galaxy; @@ -217,8 +216,7 @@ public sealed class GalaxyRepositoryGrpcServiceTests new global::ZB.MOM.WW.MxGateway.Server.Galaxy.GalaxyRepository(options), new StubGalaxyHierarchyCache(entry), new GalaxyDeployNotifier(), - new GatewayRequestIdentityAccessor(), - NullLogger.Instance); + new GatewayRequestIdentityAccessor()); } private static GalaxyHierarchyCacheEntry CreateEntry(IReadOnlyList objects) @@ -366,8 +364,7 @@ public sealed class GalaxyRepositoryGrpcServiceTests new global::ZB.MOM.WW.MxGateway.Server.Galaxy.GalaxyRepository(options), new NeverLoadsHierarchyCache(), new GalaxyDeployNotifier(), - new GatewayRequestIdentityAccessor(), - NullLogger.Instance); + new GatewayRequestIdentityAccessor()); // No caller-supplied CT so WaitForCacheBootstrap exits via its 5s internal budget // (instead of re-throwing OperationCanceledException from the caller's CT). The @@ -448,8 +445,7 @@ public sealed class GalaxyRepositoryGrpcServiceTests new global::ZB.MOM.WW.MxGateway.Server.Galaxy.GalaxyRepository(options), new StubGalaxyHierarchyCache(CreateEntry(CreateFilterObjects())), new GalaxyDeployNotifier(), - identityAccessor, - NullLogger.Instance); + identityAccessor); // Sanity: with no identity pushed, both Pump and Valve come back under Line3 (id=2). BrowseChildrenReply unconstrained = await service.BrowseChildren(