Sentinel
Sentinel copied to clipboard
fix: DefaultBlockRequestHandler Adapt to SpringBoot 3
Describe what this PR does / why we need it
DefaultBlockRequestHandler Adapt to SpringBoot 3
Does this pull request fix one issue?
Closes https://github.com/alibaba/Sentinel/issues/3298
Describe how you did it
org.springframework.web.reactive.function.server.ServerResponse#status(org.springframework.http.HttpStatus) method was modified in springboot 3 to org.springframework.web.reactive.function.server.ServerResponse#status(org.springframework.http.HttpStatusCode)
but Both versions are available org.springframework.web.reactive.function.server.ServerResponse#status(int) method. so i modified it.
Describe how to verify it
https://github.com/alibaba/spring-cloud-alibaba/issues/3688
Special notes for reviews
Could you mind add unit test for this case? Which means, before this PR gets merged, the test will fail. The test is very helpful for long-runt maintains, and can prevent similar errors.
Codecov Report
Attention: Patch coverage is 0%
with 4 lines
in your changes are missing coverage. Please review.
Project coverage is 45.92%. Comparing base (
cd02b1d
) to head (477e25a
).
:exclamation: Current head 477e25a differs from pull request most recent head 95cc1f3. Consider uploading reports for the commit 95cc1f3 to get more accurate results
Files | Patch % | Lines |
---|---|---|
...ateway/sc/callback/DefaultBlockRequestHandler.java | 0.00% | 2 Missing :warning: |
...g/webflux/callback/DefaultBlockRequestHandler.java | 0.00% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## 1.8 #3379 +/- ##
============================================
+ Coverage 45.89% 45.92% +0.03%
- Complexity 2145 2147 +2
============================================
Files 431 431
Lines 12903 12903
Branches 1727 1727
============================================
+ Hits 5922 5926 +4
+ Misses 6279 6277 -2
+ Partials 702 700 -2
Components | Coverage Δ | |
---|---|---|
sentinel-adapter | 43.22% <0.00%> (ø) |
|
sentinel-cluster | 23.71% <ø> (ø) |
|
sentinel-core | 59.64% <ø> (+0.01%) |
:arrow_up: |
sentinel-extension | 46.32% <ø> (+0.13%) |
:arrow_up: |
sentinel-logging | 54.54% <ø> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@robberphex added DefaultBlockRequestHandler unit test.
@robberphex Are you still planning to process this PR?