feat: support custom cache and email in TestRequestBuilder#582
Open
m4tx wants to merge 1 commit into
Open
Conversation
6 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Exposes public cache and email setters on TestRequestBuilder, so tests can supply custom cache and email backends instead of relying on the default in-memory cache and console email transport. The underlying fields and their consumption in build() already existed; this PR only adds the setter methods (gated behind the cache and email features).
Changes:
- Add
TestRequestBuilder::cache(Cache)setter under#[cfg(feature = "cache")]. - Add
TestRequestBuilder::email(Email)setter under#[cfg(feature = "email")]. - Add doctest examples for both setters.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
| Branch | test-cache-email |
| Testbed | github-ubuntu-latest |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result milliseconds (ms) (Result Δ%) | Upper Boundary milliseconds (ms) (Limit %) |
|---|---|---|---|
| empty_router/empty_router | 📈 view plot 🚷 view threshold | 7.09 ms(+15.95%)Baseline: 6.11 ms | 7.72 ms (91.75%) |
| json_api/json_api | 📈 view plot 🚷 view threshold | 1.16 ms(+7.75%)Baseline: 1.08 ms | 1.32 ms (87.48%) |
| nested_routers/nested_routers | 📈 view plot 🚷 view threshold | 1.05 ms(+6.15%)Baseline: 0.99 ms | 1.20 ms (87.54%) |
| single_root_route/single_root_route | 📈 view plot 🚷 view threshold | 1.01 ms(+5.80%)Baseline: 0.96 ms | 1.17 ms (86.59%) |
| single_root_route_burst/single_root_route_burst | 📈 view plot 🚷 view threshold | 18.51 ms(+4.68%)Baseline: 17.69 ms | 21.15 ms (87.54%) |
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Type of change