docs(tests): fix CommentChecker findings across tests/ — 13,392 → 0 (repo-wide scan clean)
Comment/XML-doc changes only: - add summaries to ~10k test methods, fixtures, fakes and helpers (+ <param> on theories, <returns> on async Task methods, <inheritdoc/> on interface implementations the checker can resolve) - strip ~2.6k project-tracking references (WP*, P*-*, row-NN, Task N, #NN, Component-0NN) from comments, keeping the explanatory text; reword false positives in comments only - real docs on fakes implementing BCL/library interfaces (IDisposable, ILogger, IOptionsMonitor, IAsyncLifetime) - reword the last 5 src/ false positives (CWE-1236, failures-1, year-0001, M365) Only non-comment edits: four one-line nested classes split across lines so members can carry docs. Build 0 errors / 0 warnings.
This commit is contained in:
+20
-9
@@ -30,14 +30,14 @@ namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests.Actors;
|
||||
/// <c>ApplyDeployment</c>. The two self-heal starts did not:
|
||||
/// </para>
|
||||
/// <list type="bullet">
|
||||
/// <item><c>StartStoredInstance</c> — the path shared by the row-67 startup-reconcile
|
||||
/// ensure-started command and the row-78 sweep.</item>
|
||||
/// <item><c>StartStoredInstance</c> — the path shared by the startup-reconcile
|
||||
/// ensure-started command and the sweep.</item>
|
||||
/// <item><c>HandleEnableResult</c> — enabling an instance that was disabled at boot.</item>
|
||||
/// </list>
|
||||
///
|
||||
/// <para>
|
||||
/// <b>Row 85's live sequence (2026-08-16).</b> A fresh node-a was seeded by LocalDb CDC
|
||||
/// replication; the row-78 sweep correctly started the enabled instances, and then every tag
|
||||
/// <b>The live sequence (2026-08-16).</b> A fresh node-a was seeded by LocalDb CDC
|
||||
/// replication; the sweep correctly started the enabled instances, and then every tag
|
||||
/// subscribe failed for 6+ minutes with <c>Unknown connection: OPC PLC Simulator</c> /
|
||||
/// <c>No connection actor for OPC PLC Simulator</c>, because nothing on that node had created the
|
||||
/// connection actor. A second pair restart healed it — the boot load creates connections, so it
|
||||
@@ -73,6 +73,7 @@ public class SelfHealCreatesDclConnectionTests : TestKit, IDisposable
|
||||
/// </summary>
|
||||
private readonly ConcurrentQueue<CreateConnectionCommand> _createdConnections = new();
|
||||
|
||||
/// <summary>Initializes a new instance of the <c>SelfHealCreatesDclConnectionTests</c> class.</summary>
|
||||
public SelfHealCreatesDclConnectionTests()
|
||||
{
|
||||
_localDb = TestLocalDb.CreateTemp("dcl-selfheal-test");
|
||||
@@ -84,6 +85,7 @@ public class SelfHealCreatesDclConnectionTests : TestKit, IDisposable
|
||||
_compilationService, NullLogger<SharedScriptLibrary>.Instance);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
// Shut the actors down BEFORE the ILocalDb they write through is disposed.
|
||||
@@ -170,20 +172,21 @@ public class SelfHealCreatesDclConnectionTests : TestKit, IDisposable
|
||||
return Task.CompletedTask;
|
||||
}, TimeSpan.FromSeconds(20));
|
||||
|
||||
// ── The row-85 reproduction: a self-heal start must bring its connections with it ──
|
||||
// ── The reproduction: a self-heal start must bring its connections with it ──
|
||||
|
||||
/// <summary>
|
||||
/// THE row-85 reproduction. The node boots with an empty store, then a config for an ENABLED
|
||||
/// THE reproduction. The node boots with an empty store, then a config for an ENABLED
|
||||
/// instance appears in storage on its own — exactly what LocalDb's CDC sync applier does when
|
||||
/// it seeds a fresh node from its peer. The row-78 sweep starts the Instance Actor; the DCL
|
||||
/// it seeds a fresh node from its peer. The sweep starts the Instance Actor; the DCL
|
||||
/// must be told to create the connection that instance's tags subscribe through.
|
||||
///
|
||||
/// <para>
|
||||
/// <b>Fails before the fix</b> at the connection assert: the instance starts (row 78 works)
|
||||
/// <b>Fails before the fix</b> at the connection assert: the instance starts (the sweep works)
|
||||
/// but NO <see cref="CreateConnectionCommand"/> is ever sent, which is the live symptom —
|
||||
/// the instance is up and every tag subscribe is answered <c>Unknown connection</c>.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task SweepStartedInstance_AlsoCreatesItsDclConnection()
|
||||
{
|
||||
@@ -204,12 +207,13 @@ public class SelfHealCreatesDclConnectionTests : TestKit, IDisposable
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The row-67 startup-reconcile heal shares <c>StartStoredInstance</c> with the row-78 sweep,
|
||||
/// The startup-reconcile heal shares <c>StartStoredInstance</c> with the sweep,
|
||||
/// so it had the identical gap: the reconcile fetched and stored a config, the Deployment
|
||||
/// Manager started the instance, and its connections were never created.
|
||||
///
|
||||
/// <para><b>Fails before the fix.</b></para>
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ReconcileEnsureStartedInstance_AlsoCreatesItsDclConnection()
|
||||
{
|
||||
@@ -235,6 +239,7 @@ public class SelfHealCreatesDclConnectionTests : TestKit, IDisposable
|
||||
///
|
||||
/// <para><b>Fails before the fix.</b></para>
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task EnabledInstance_DisabledAtBoot_AlsoCreatesItsDclConnection()
|
||||
{
|
||||
@@ -268,6 +273,7 @@ public class SelfHealCreatesDclConnectionTests : TestKit, IDisposable
|
||||
/// <c>_createdConnections</c> hash guard inside <c>EnsureDclConnection</c> were ever lost.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task SweepStartedInstance_CreatesTheConnection_ExactlyOnce_AcrossManySweeps()
|
||||
{
|
||||
@@ -290,6 +296,7 @@ public class SelfHealCreatesDclConnectionTests : TestKit, IDisposable
|
||||
/// all. The hash guard is what makes the connection-ensure safe to sit in the creation
|
||||
/// funnel, and this pins it against a config that never changes.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Sweep_SendsNoConnectionCommands_WhenThereIsNothingToHeal()
|
||||
{
|
||||
@@ -319,6 +326,7 @@ public class SelfHealCreatesDclConnectionTests : TestKit, IDisposable
|
||||
/// connections — it passes both before and after the fix, which is the point of a
|
||||
/// refactor guard.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task OrdinaryDeploy_StillCreatesItsDclConnection()
|
||||
{
|
||||
@@ -344,6 +352,7 @@ public class SelfHealCreatesDclConnectionTests : TestKit, IDisposable
|
||||
/// stored BEFORE the manager starts, so the boot load — not the sweep — is what creates the
|
||||
/// instance, and it must still bring its connections with it.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task BootLoadedInstance_StillCreatesItsDclConnection()
|
||||
{
|
||||
@@ -365,6 +374,8 @@ public class SelfHealCreatesDclConnectionTests : TestKit, IDisposable
|
||||
/// </summary>
|
||||
private sealed class DclConnectionSpy : ReceiveActor
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <c>DclConnectionSpy</c> class.</summary>
|
||||
/// <param name="creates">The creates.</param>
|
||||
public DclConnectionSpy(ConcurrentQueue<CreateConnectionCommand> creates)
|
||||
{
|
||||
Receive<CreateConnectionCommand>(creates.Enqueue);
|
||||
|
||||
Reference in New Issue
Block a user