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:
@@ -11,7 +11,7 @@ using TemplateAttribute = ZB.MOM.WW.ScadaBridge.Commons.Entities.Templates.Templ
|
||||
namespace ZB.MOM.WW.ScadaBridge.DeploymentManager.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// WP2.5: the flatten-session cache. Pins the two properties the bulk deploy path
|
||||
/// The flatten-session cache. Pins the two properties the bulk deploy path
|
||||
/// depends on — that N instances sharing a template chain load that chain ONCE per
|
||||
/// session, and that a template mutation (observed through the watermark)
|
||||
/// invalidates the memo so a session can never serve stale template state.
|
||||
@@ -28,6 +28,7 @@ public class FlattenSessionCacheTests
|
||||
private readonly TemplateGraphWatermark _watermark = new();
|
||||
private readonly FlatteningPipeline _sut;
|
||||
|
||||
/// <summary>Initializes the test with an in-memory repository and a counting flattening pipeline.</summary>
|
||||
public FlattenSessionCacheTests()
|
||||
{
|
||||
_sharedSchemaRepo.ListAsync(Arg.Any<CancellationToken>()).Returns([]);
|
||||
@@ -67,6 +68,8 @@ public class FlattenSessionCacheTests
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies that shared session, ten instances one template, loads each template once.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task SharedSession_TenInstancesOneTemplate_LoadsEachTemplateOnce()
|
||||
{
|
||||
@@ -95,6 +98,8 @@ public class FlattenSessionCacheTests
|
||||
await _siteRepo.Received(1).GetDataConnectionsBySiteIdAsync(SiteId, Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that no shared session, every instance reloads the chain.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task NoSharedSession_EveryInstanceReloadsTheChain()
|
||||
{
|
||||
@@ -102,7 +107,7 @@ public class FlattenSessionCacheTests
|
||||
ArrangeSharedChain(instanceCount);
|
||||
|
||||
// Baseline: without a shared session each flatten gets its own private
|
||||
// one, which is the pre-WP2.5 behaviour the batch path improves on.
|
||||
// one, which is the earlier per-instance behaviour the batch path improves on.
|
||||
for (var i = 1; i <= instanceCount; i++)
|
||||
{
|
||||
var result = await _sut.FlattenAndValidateAsync(i, CancellationToken.None, validateScripts: false);
|
||||
@@ -113,6 +118,8 @@ public class FlattenSessionCacheTests
|
||||
.GetTemplateWithChildrenAsync(TemplateId, Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that template mutation, invalidates memo, so session never serves stale state.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task TemplateMutation_InvalidatesMemo_SoSessionNeverServesStaleState()
|
||||
{
|
||||
@@ -133,6 +140,8 @@ public class FlattenSessionCacheTests
|
||||
await _templateRepo.Received(1).GetTemplateWithChildrenAsync(ParentTemplateId, Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that structural mutation, invalidates cached chain membership.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task StructuralMutation_InvalidatesCachedChainMembership()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user