You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/08/21 12:08:15 UTC

[GitHub] [apisix] spacewander commented on a diff in pull request #7750: fix(limit-count): different route with same conf should not share counter

spacewander commented on code in PR #7750:
URL: https://github.com/apache/apisix/pull/7750#discussion_r950835195


##########
t/plugin/limit-count3.t:
##########
@@ -224,3 +224,64 @@ passed
     }
 --- response_body
 [200,200]
+
+
+
+=== TEST 7: set another route with the same conf
+--- config
+    location /t {
+        content_by_lua_block {
+            local t = require("lib.test_admin").test
+            local code, body = t('/apisix/admin/routes/2',
+                ngx.HTTP_PUT,
+                [[{
+                    "uri": "/hello1",
+                    "plugins": {
+                        "limit-count": {
+                            "count": 2,
+                            "time_window": 60
+                        }

Review Comment:
   > is the same conf mean the value of attr such as count or time_window all equal to another limit-count in other routes?
   
   Yes.



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org