Uh oh!
There was an error while loading. Please reload this page.
[Test Improver] Add unit tests for RetryAttribute - #7838
Conversation
Add 13 unit tests covering RetryAttribute constructor validation, BackoffType property validation, and ExecuteAsync retry logic: - Constructor rejects maxRetryAttempts < 1 - BackoffType setter rejects invalid enum values - ExecuteAsync stops early when retry succeeds - ExecuteAsync runs exactly MaxRetryAttempts times on all failures - ExecuteAsync stops on Inconclusive result Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds focused unit-level coverage for RetryAttribute behavior in the MSTest framework test suite, complementing existing integration-level coverage (per #7824).
Changes:
- Adds constructor validation tests for
RetryAttribute(maxRetryAttempts). - Adds
BackoffTypeproperty validation tests (invalid enum values rejected, default/valid values accepted). - Adds
ExecuteAsyncretry-loop behavior tests (early success, max-attempt failures, timeout propagation, inconclusive stop).
Show a summary per file
| File | Description |
|---|---|
test/UnitTests/TestFramework.UnitTests/Attributes/RetryAttributeTests.cs | New unit tests covering RetryAttribute validation and retry execution logic. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 2
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Apply object initializer syntax (IDE0017) and explicit types instead of var with non-apparent types (IDE0008) to pass Windows CI build which treats analyzer warnings as errors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Commit pushed:
|
🤖 Test Improver here - I'm an automated AI assistant. Pushed a fix for the Windows CI build failures. Root cause:
Build now passes locally with Note 🔒 Integrity filter blocked 9 itemsThe following items were blocked because they don't meet the GitHub integrity level.
To allow these resources, lower tools:
github:
min-integrity: approved # merged | approved | unapproved | none
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Add 13 unit tests covering RetryAttribute constructor validation, BackoffType property validation, and ExecuteAsync retry logic:
Fixes#7824