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:
@@ -4,7 +4,7 @@ using ZB.MOM.WW.ScadaBridge.SiteRuntime.Scripts;
|
||||
namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests.Scripts;
|
||||
|
||||
/// <summary>
|
||||
/// WP3.1 test group 5 — the blocking script pool is no longer a fixed 8 threads forever. It
|
||||
/// The blocking script pool is no longer a fixed 8 threads forever. It
|
||||
/// scales with the number of running instances between a configured floor and ceiling, and it
|
||||
/// is deliberately GROW-ONLY: undeploying instances leaves idle threads (which cost nothing
|
||||
/// measurable) rather than paying for drain/steal complexity.
|
||||
@@ -17,8 +17,11 @@ public class ScriptPoolSizingTests
|
||||
ScriptExecutionMaxThreadCount = ceiling
|
||||
};
|
||||
|
||||
/// <summary>Verifies that the target thread count applies the floor, ratio and ceiling.</summary>
|
||||
/// <param name="instances">The number of running instances.</param>
|
||||
/// <param name="expected">The expected target thread count.</param>
|
||||
[Theory]
|
||||
// At or below floor * 8 instances the result is exactly the pre-WP3.1 fixed size —
|
||||
// At or below floor * 8 instances the result is exactly the original fixed size —
|
||||
// existing configurations are byte-for-byte unchanged in behaviour.
|
||||
[InlineData(0, 8)]
|
||||
[InlineData(1, 8)]
|
||||
@@ -33,6 +36,7 @@ public class ScriptPoolSizingTests
|
||||
public void ComputeTargetThreads_AppliesFloorRatioAndCeiling(int instances, int expected)
|
||||
=> Assert.Equal(expected, ScriptExecutionScheduler.ComputeTargetThreads(instances, Options()));
|
||||
|
||||
/// <summary>Verifies that an overridden floor and ceiling are honoured.</summary>
|
||||
[Fact]
|
||||
public void ComputeTargetThreads_HonoursAnOverriddenFloorAndCeiling()
|
||||
{
|
||||
@@ -43,6 +47,7 @@ public class ScriptPoolSizingTests
|
||||
Assert.Equal(4, ScriptExecutionScheduler.ComputeTargetThreads(1000, options));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the target thread count is never less than one, even with a degenerate floor.</summary>
|
||||
[Fact]
|
||||
public void ComputeTargetThreads_NeverReturnsLessThanOne_EvenWithADegenerateFloor()
|
||||
{
|
||||
@@ -53,6 +58,7 @@ public class ScriptPoolSizingTests
|
||||
Assert.Equal(1, ScriptExecutionScheduler.ComputeTargetThreads(500, options));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that EnsureCapacity grows once, is idempotent and never shrinks.</summary>
|
||||
[Fact]
|
||||
public void EnsureCapacity_GrowsOnce_IsIdempotent_AndNeverShrinks()
|
||||
{
|
||||
@@ -71,6 +77,8 @@ public class ScriptPoolSizingTests
|
||||
Assert.Equal(5, scheduler.MaximumConcurrencyLevel);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that EnsureCapacity widens the gauges so the whole pool is observable.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task EnsureCapacity_WidensTheGauges_SoTheWholePoolIsObservable()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user