Skip to content

fix bug - #29

Merged
TopSwagCode merged 1 commit into
masterfrom
feature/reduce-duplication
Feb 12, 2026
Merged

TopSwagCode merged 1 commit into
masterfrom
feature/reduce-duplication

Conversation

@TopSwagCode

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-thrown TimeoutException (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

@TopSwagCode
TopSwagCode merged commit abd374e into master Feb 12, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants