Add configurable non-transparent OPC UA server redundancy
Separates ApplicationUri from namespace identity so each instance in a redundant pair has a unique server URI while sharing the same Galaxy namespace. Exposes RedundancySupport, ServerUriArray, and dynamic ServiceLevel through the standard OPC UA server object. ServiceLevel is computed from role (Primary/Secondary) and runtime health (MXAccess and DB connectivity). Adds CLI redundancy command, second deployed service instance, and 31 new tests including paired-server integration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -110,11 +110,17 @@ namespace ZB.MOM.WW.LmxOpcUa.Tests.Helpers
|
||||
/// <param name="mxClient">An optional fake MXAccess client to inject; otherwise a default fake is created.</param>
|
||||
/// <param name="repo">An optional fake repository to inject; otherwise standard test data is used.</param>
|
||||
/// <param name="security">An optional security profile configuration for the test server.</param>
|
||||
/// <param name="redundancy">An optional redundancy configuration for the test server.</param>
|
||||
/// <param name="applicationUri">An optional explicit application URI for the test server.</param>
|
||||
/// <param name="serverName">An optional server name override for the test server.</param>
|
||||
/// <returns>A fixture configured to exercise the direct fake-client path.</returns>
|
||||
public static OpcUaServerFixture WithFakeMxAccessClient(
|
||||
FakeMxAccessClient? mxClient = null,
|
||||
FakeGalaxyRepository? repo = null,
|
||||
SecurityProfileConfiguration? security = null)
|
||||
SecurityProfileConfiguration? security = null,
|
||||
RedundancyConfiguration? redundancy = null,
|
||||
string? applicationUri = null,
|
||||
string? serverName = null)
|
||||
{
|
||||
var client = mxClient ?? new FakeMxAccessClient();
|
||||
var r = repo ?? new FakeGalaxyRepository
|
||||
@@ -130,6 +136,12 @@ namespace ZB.MOM.WW.LmxOpcUa.Tests.Helpers
|
||||
|
||||
if (security != null)
|
||||
builder.WithSecurity(security);
|
||||
if (redundancy != null)
|
||||
builder.WithRedundancy(redundancy);
|
||||
if (applicationUri != null)
|
||||
builder.WithApplicationUri(applicationUri);
|
||||
if (serverName != null)
|
||||
builder.WithGalaxyName(serverName);
|
||||
|
||||
return new OpcUaServerFixture(builder, repo: r, mxClient: client);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user