Files
lmxopcua/tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests
Joseph Doherty 7829b937d1 feat(717): Warm non-transparent redundancy, default-off (T1-T10)
OpcUa:Redundancy:Mode (Unset default = today's server exactly; None; Warm; Hot and unknown values fail start).
- T1 options + validator + effective-URI check + boot banner; Warm needs the driver role.
- T2 metadata in OnNodeManagerStartedAsync: Warm -> NonTransparentRedundancyType, read-only
  ServerUriArray [self, peers], RedundancySupport=Warm, boot ServiceLevel 1; None -> RedundancySupport=None
  and the SDK's orphan i=11314 deleted; Unset untouched.
- T3 RedundancyStateChanged.Revision (up-number, incarnation tick, sequence); subscribers drop older
  revisions under Warm (OpcUaPublishActor, DriverHostActor); unrevisioned never makes a node Active.
- T4 WarmRoleAuthority + ComputeWarm bands (Standby 90/50, Active 250/200/100), PromoteWhilePrimaryUnreachable.
- T5 IStandbyProjection + DeferredStandbyProjection; OpcUaPublishActor runs promotion/demotion in the spec
  4.7 order (Active level last and retried; Standby level first, data degraded regardless).
- T6 EquipmentVariableState read projection (BadOutOfService/null); Warm Standby refuses writes BadInvalidState.
- T7 D4 mechanism adopted after T0: ordinary-tag marker on MonitoredItemNotification.Message validated by
  (ClientHandle, DataValue); first-delivery decision keyed by (SubscriptionId, SequenceNumber); the SDK's
  cached copy is never mutated.
- T8 queue current/BadOutOfService to live ordinary-tag items ignoring filters.
- T9 alarm stamp/deliver split (suppressed on Standby), Part 9 methods refused on Standby, promotion
  refresh via ISubscription.ConditionRefresh2Async on every live event item.
- T10 deploy-time RedundancyMode cross-check + six instruments.

Claude-Session: https://claude.ai/code/session_01GT67ACmpMR7b9LGRPLijMi
2026-11-13 03:39:50 -05:00
..
…

ZB.MOM.WW.OtOpcUa.Host.IntegrationTests

Two-node Akka cluster integration tests on top of TwoNodeClusterHarness.

Default mode (no infra required)

dotnet test tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests

Uses Microsoft.EntityFrameworkCore.InMemory for ConfigDb and a stub ILdapAuthService that accepts any username when the password is valid-password. Each harness instance creates a unique in-memory database scoped to its lifetime. This is the mode CI runs by default.

Real-infra mode (SQL Server + OpenLDAP)

When you need to exercise EF behaviors that diverge between providers (index uniqueness, RowVersion concurrency, JSON columns, migration application) or a real LDAP bind, bring up the bundled compose stack and set the env-var switches:

docker compose -f tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/docker-compose.yml up -d

export OTOPCUA_HARNESS_USE_SQL=1
export OTOPCUA_HARNESS_USE_LDAP=1
dotnet test tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests

docker compose -f tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests/docker-compose.yml down -v

SQL Server mode (OTOPCUA_HARNESS_USE_SQL=1)

  • Container: mcr.microsoft.com/mssql/server:2022-latest on localhost:14331
  • Each TwoNodeClusterHarness.StartAsync() creates a unique database OtOpcUa_Harness_{guid} via Database.EnsureCreatedAsync() and drops it on DisposeAsync() (best-effort).
  • Port 14331 chosen to avoid colliding with the docker-dev/ fleet (which uses 14330).

LDAP mode (OTOPCUA_HARNESS_USE_LDAP=1)

  • Container: bitnami/openldap:2.6 on localhost:3894
  • Users alice / alice123 and bob / bob123, all under ou=FleetAdmin.
  • Port 3894 chosen to avoid colliding with the docker-dev/ fleet (which uses 3893).

Local-dev caveat

This dev VM (DESKTOP-6JL3KKO) does not run Docker locally. Real-infra mode runs on the shared Linux Docker host (10.100.0.35) per docs/v2/dev-environment.md, or in CI on Linux.