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:
@@ -3,12 +3,14 @@ using Microsoft.Extensions.Logging.Abstractions;
|
||||
namespace ZB.MOM.WW.ScadaBridge.Host.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// Host-010: startup preconditions (database migration) must tolerate a database
|
||||
/// Startup preconditions (database migration) must tolerate a database
|
||||
/// that is briefly unavailable at boot — common when an app container and its DB
|
||||
/// container start together — via a bounded retry with backoff.
|
||||
/// </summary>
|
||||
public class StartupRetryTests
|
||||
{
|
||||
/// <summary>Verifies that an operation that succeeds on the first try runs exactly once.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ExecuteWithRetry_SucceedsFirstTry_RunsOnce()
|
||||
{
|
||||
@@ -23,6 +25,8 @@ public class StartupRetryTests
|
||||
Assert.Equal(1, attempts);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that transient failures are retried until the operation succeeds.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ExecuteWithRetry_TransientFailures_RetriesUntilSuccess()
|
||||
{
|
||||
@@ -43,6 +47,8 @@ public class StartupRetryTests
|
||||
Assert.Equal(3, attempts);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that exhausting all attempts rethrows the last exception.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ExecuteWithRetry_ExhaustsAttempts_RethrowsLastException()
|
||||
{
|
||||
@@ -64,10 +70,12 @@ public class StartupRetryTests
|
||||
Assert.Equal("failure 3", ex.Message);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a non-transient failure is rethrown after a single attempt.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ExecuteWithRetry_NonTransientFailure_RethrowsAfterSingleAttempt()
|
||||
{
|
||||
// Host-015: a permanent failure (e.g. a schema-version mismatch) must NOT be
|
||||
// A permanent failure (e.g. a schema-version mismatch) must NOT be
|
||||
// retried — retrying it cannot succeed and only delays the fatal exit by
|
||||
// minutes. The isTransient predicate classifies it as non-retryable, so the
|
||||
// operation runs exactly once before the exception propagates.
|
||||
@@ -89,6 +97,8 @@ public class StartupRetryTests
|
||||
Assert.Equal("permanent schema mismatch", ex.Message);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a transient failure followed by a permanent one stops at the permanent failure.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ExecuteWithRetry_TransientThenPermanent_StopsAtPermanent()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user