Copilot commented on code in PR #7097:
URL: https://github.com/apache/shenyu/pull/7097#discussion_r4032808538


##########
shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/NettyHttpClientPlugin.java:
##########
@@ -90,6 +91,9 @@ protected Mono<HttpClientResponse> doRequest(final 
ServerWebExchange exchange, f
                     if (LOG.isDebugEnabled()) {
                         LOG.debug("NettyHttpClient response: status={}", 
res.status().code());
                     }
+                    if (shouldFailover(exchange, res.status().code())) {
+                        return 
connection.inbound().receive().then(Mono.error(new 
ShenyuUpstreamStatusException(res.status().code())));

Review Comment:
   The new Reactor Netty failover branch has no regression coverage: 
`NettyHttpClientPluginTest` never serves an upstream 5xx, so neither body 
draining nor exception emission is exercised. Add a test that returns a 5xx 
response with `FAILOVER` configured and verifies 
`ShenyuUpstreamStatusException` (and ideally that non-failover handling remains 
unchanged).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to