Skip to content

Comments

Preserve failure policies on stubbed message handlers#2143

Merged
jeremydmiller merged 1 commit intomainfrom
GH2119
Feb 9, 2026
Merged

Preserve failure policies on stubbed message handlers#2143
jeremydmiller merged 1 commit intomainfrom
GH2119

Conversation

@jeremydmiller
Copy link
Member

Summary

  • Fixes feat: Policy testing doesn't work with wolverine stubbing #2117: StubTransport.BuildFor() was creating Executor instances with an empty FailureRuleCollection, discarding all chain-level and global error handling policies (retries, discard, custom failure actions)
  • Now looks up the original HandlerChain's failure rules via _runtime.Handlers.ChainFor(messageType) and combines them with global rules, matching the behavior of the normal Executor.Build() path
  • Also preserves the chain's configured message timeout instead of hard-coding 10 seconds

Test plan

  • All 999 CoreTests pass with no regressions
  • Verify stubbed handlers respect RetryWithCooldown and custom failure policies in integration tests

🤖 Generated with Claude Code

StubTransport.BuildFor() was creating Executors with an empty FailureRuleCollection,
discarding all chain-level and global error handling policies (retries, discard, custom
failure actions). Now looks up the original HandlerChain's failure rules and timeout,
matching the behavior of the normal Executor.Build() path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

feat: Policy testing doesn't work with wolverine stubbing

1 participant