fix bug - #29
Merged
Merged
fix bug#29
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes exception handling in the retry logic for background workers and improves signature matching between runtime and source generator.
Changes:
- Fixed signature format to include return type, preventing mismatches when delegates have same parameters but different return types
- Improved retry logic to distinguish between framework timeout cancellations (no retry), user-thrown
OperationCanceledException(retry), and user-thrownTimeoutException(no retry when timeout configured) - Removed unreachable code after throw statements in test cases
- Added comprehensive test coverage for new exception handling behaviors
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/MinimalWorker.Test/RetryTests.cs | Removed unreachable code after throw statements; added new test cases for user-thrown OperationCanceledException and TimeoutException handling across all worker types; added test for retry delay behavior |
| src/MinimalWorker/BackgroundWorkerExtensions.cs | Added void type handling to FormatTypeName; updated signature format to include return type for all three worker types (Continuous, Periodic, Cron) |
| src/MinimalWorker.Generators/WorkerEmitter.cs | Updated signature matching to include return type; enhanced exception handling to distinguish between framework timeouts and user-thrown exceptions; added catch block for user-thrown TimeoutException |
| .claude/settings.local.json | Added bash commands for dotnet clean and dotnet restore to allowed commands list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.