64e3fbe035
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
Adds <summary>, <param>, <typeparam>, and <inheritdoc/> tags to public members surfaced by commentchecker — resolves 5,847 of 5,869 issues (99.6%) across three /fixdocs passes.
58 lines
2.0 KiB
C#
58 lines
2.0 KiB
C#
using Akka.Configuration;
|
|
using Shouldly;
|
|
using Xunit;
|
|
|
|
namespace ZB.MOM.WW.OtOpcUa.Cluster.Tests;
|
|
|
|
public sealed class HoconLoaderTests
|
|
{
|
|
/// <summary>Verifies that LoadBaseConfig returns a non-empty string.</summary>
|
|
[Fact]
|
|
public void LoadBaseConfig_returns_nonempty_string()
|
|
{
|
|
var hocon = HoconLoader.LoadBaseConfig();
|
|
hocon.ShouldNotBeNullOrWhiteSpace();
|
|
}
|
|
|
|
/// <summary>Verifies that base config parses to cluster provider.</summary>
|
|
[Fact]
|
|
public void Base_config_parses_to_cluster_provider()
|
|
{
|
|
var cfg = ConfigurationFactory.ParseString(HoconLoader.LoadBaseConfig());
|
|
cfg.GetString("akka.actor.provider").ShouldBe("cluster");
|
|
}
|
|
|
|
/// <summary>Verifies that split-brain resolver is set to keep-oldest.</summary>
|
|
[Fact]
|
|
public void Split_brain_resolver_is_keep_oldest()
|
|
{
|
|
var cfg = ConfigurationFactory.ParseString(HoconLoader.LoadBaseConfig());
|
|
cfg.GetString("akka.cluster.split-brain-resolver.active-strategy").ShouldBe("keep-oldest");
|
|
}
|
|
|
|
/// <summary>Verifies that stable-after is configured to 15 seconds.</summary>
|
|
[Fact]
|
|
public void Stable_after_is_15_seconds()
|
|
{
|
|
var cfg = ConfigurationFactory.ParseString(HoconLoader.LoadBaseConfig());
|
|
cfg.GetTimeSpan("akka.cluster.split-brain-resolver.stable-after")
|
|
.ShouldBe(TimeSpan.FromSeconds(15));
|
|
}
|
|
|
|
/// <summary>Verifies that failure detector threshold is set to 10.</summary>
|
|
[Fact]
|
|
public void Failure_detector_threshold_is_10()
|
|
{
|
|
var cfg = ConfigurationFactory.ParseString(HoconLoader.LoadBaseConfig());
|
|
cfg.GetDouble("akka.cluster.failure-detector.threshold").ShouldBe(10.0);
|
|
}
|
|
|
|
/// <summary>Verifies that OPC UA synchronized dispatcher is configured as pinned.</summary>
|
|
[Fact]
|
|
public void Opcua_synchronized_dispatcher_is_pinned()
|
|
{
|
|
var cfg = ConfigurationFactory.ParseString(HoconLoader.LoadBaseConfig());
|
|
cfg.GetString("opcua-synchronized-dispatcher.type").ShouldBe("PinnedDispatcher");
|
|
}
|
|
}
|