shreemaan-abhishek commented on code in PR #9291:
URL: https://github.com/apache/apisix/pull/9291#discussion_r1165041405


##########
t/plugin/limit-count4.t:
##########
@@ -171,3 +171,57 @@ passed
     }
 --- response_body
 ["1","0","0"]
+
+
+
+=== TEST 5: modified limit-count.incoming, cost == 2
+--- config
+    location = /t {
+        content_by_lua_block {
+            local limit_count_local = require 
"apisix.plugins.limit-count.limit-count-local"
+            local lim = limit_count_local.new("plugin-limit-count", 10, 60)
+            local uri = ngx.var.uri
+            for i = 1, 7 do
+                local delay, err = lim.limit_count:handle_incoming(uri, 2, 
true)

Review Comment:
   In fact, the `handle_incoming` is a part of APISIX. I extended the existing 
function from lua-resty-limit-traffic.
   
   
https://github.com/apache/apisix/blob/f294304b61f104db6ef3cff9cc26e9a36d125824/apisix/plugins/limit-count/limit-count-local.lua#L19-L43



-- 
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