AlinsRan commented on code in PR #12751:
URL: https://github.com/apache/apisix/pull/12751#discussion_r2583669950
##########
t/plugin/limit-count-redis.t:
##########
@@ -51,6 +51,7 @@ __DATA__
--- config
location /t {
content_by_lua_block {
+ require("lib.test_redis").flush_all()
Review Comment:
It can be globally initialized and reset without the need to call it in
every test chunk, and the same applies to other test files.
add_block_preprocessor(sub {
my ($block) = @_;
my $extra_init_worker_by_lua = <<_EOC_;
require("lib.test_redis").flush_all()
_EOC_
$block->set_value("extra_init_worker_by_lua", $extra_init_worker_by_lua);
});
--
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]