nic-6443 commented on code in PR #12861:
URL: https://github.com/apache/apisix/pull/12861#discussion_r2726328924
##########
t/plugin/limit-count-redis-cluster3.t:
##########
@@ -183,3 +183,37 @@ passed
["GET /hello", "GET /hello", "GET /hello"]
--- error_code eval
[200, 200, 503]
+
+
+
+=== TEST 6: check redis cluster keepalive param
+--- config
+ location /t {
+ content_by_lua_block {
+ local lim_count_redis_cluster =
require("apisix.plugins.limit-count.limit-count-redis-cluster")
+ local conf = {
+ count = 2,
+ time_window = 60,
+ rejected_code = 503,
+ key = "remote_addr",
+ policy = "redis-cluster",
+ redis_timeout = 1001,
+ keepalive_timeout = 10000,
+ keepalive_pool = 100,
+ redis_cluster_nodes = {
+ "127.0.0.1:5000"
+ },
+ redis_cluster_name = "redis-cluster-1"
+ }
+ local lim = lim_count_redis_cluster.new("limit-count", 2, 60, conf)
+ local redis_conf = lim.red_cli.config
+ if redis_conf.keepalive_timeout ==10000 and
redis_conf.keepalive_cons == 100 then
Review Comment:
```suggestion
if redis_conf.keepalive_timeout == 10000 and
redis_conf.keepalive_cons == 100 then
```
--
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]