wxbty commented on PR #9663:
URL: https://github.com/apache/apisix/pull/9663#issuecomment-1611330751
> @wxbty Just add a test case that will raise an error before your fix and
will not raise an error after
I'm an openresty beginner. I wrote a unit test but it didn't take effect. I
don't know why it didn't enter the decrease method of the plugin. Can you help
me to take a look? thanks very much 🤔
=== TEST 1: decrease
--- config
location /t {
content_by_lua_block {
ngx.ctx.proxy_passed = false
local plugin = require("apisix.plugins.limit-conn")
local p = plugin.log(nil,ngx.ctx)
ngx.say("done")
}
}
--- request
GET /t
--- response_body
done
This unit test is located in stream-plugin/limit-conn.t, expecting to throw
an exception, because its limit_conn log method calls decrease(conf, ctx), but
now it passes, and does not print the additional warn log added by the decrease
method
--
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]