HaoTien commented on code in PR #12765:
URL: https://github.com/apache/apisix/pull/12765#discussion_r2660184991
##########
t/lib/server.lua:
##########
@@ -382,14 +378,20 @@ function _M.websocket_handshake()
return ngx.exit(444)
end
end
+
_M.websocket_handshake_route = _M.websocket_handshake
function _M.api_breaker()
- ngx.exit(tonumber(ngx.var.arg_code))
+ local code = tonumber(ngx.var.arg_code) or 200
Review Comment:
Replace ngx.say with ngx.print. The reason is that the test cases strictly
match the content of the response body and do not expect a newline character at
the end. ngx.say will automatically add line breaks, while ngx.print will not
--
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]