docs+test(r2-02): bulkhead doc sweep + parsed-knob-must-be-wired guard (01/U-6, OVERALL theme 1)
This commit is contained in:
@@ -8,6 +8,34 @@ namespace ZB.MOM.WW.OtOpcUa.Core.Tests.Resilience;
|
||||
[Trait("Category", "Unit")]
|
||||
public sealed class DriverResilienceOptionsTests
|
||||
{
|
||||
/// <summary>
|
||||
/// 01/U-6 knob-inertness guard (OVERALL theme #1): the public property set of
|
||||
/// <see cref="DriverResilienceOptions"/> must be EXACTLY the pipeline-wired knobs. Every option a
|
||||
/// parser can populate must map to a strategy the builder actually composes — a parsed-but-unapplied
|
||||
/// knob (the bulkhead genre this pass deleted) is inertness the interface-forwarding and
|
||||
/// unwrapped-dispatch guards can't catch. To add a knob: wire it in <c>DriverResiliencePipelineBuilder</c>,
|
||||
/// add a behavior test that proves it engages, THEN add it to the expected set below.
|
||||
/// (<c>RecycleIntervalSeconds</c> is itself Tier-C-dormant per 01/U-2 — a documented open question,
|
||||
/// explicitly out of this pass's scope; it stays in the expected list as the recycle scheduler, not
|
||||
/// the Polly pipeline, is its consumer.)
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void Options_properties_are_exactly_the_pipeline_wired_set()
|
||||
{
|
||||
var expected = new[] { "Tier", "CapabilityPolicies", "RecycleIntervalSeconds" };
|
||||
|
||||
var actual = typeof(DriverResilienceOptions)
|
||||
.GetProperties()
|
||||
.Select(p => p.Name)
|
||||
.OrderBy(n => n)
|
||||
.ToArray();
|
||||
|
||||
actual.ShouldBe(expected.OrderBy(n => n).ToArray(),
|
||||
"DriverResilienceOptions must expose only pipeline-wired knobs — a new option needs a builder " +
|
||||
"strategy + a behavior test before it is added to the expected set (guards against the deleted " +
|
||||
"bulkhead 'parsed-but-unapplied' genre; see 01/U-6).");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that tier defaults cover every capability.</summary>
|
||||
/// <param name="tier">The driver tier to test.</param>
|
||||
[Theory]
|
||||
|
||||
Reference in New Issue
Block a user