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 2020/11/06 00:53:07 UTC

[GitHub] [apisix] spacewander commented on a change in pull request #2596: fix(log-rotate): avoid creating multiple timers

spacewander commented on a change in pull request #2596:
URL: https://github.com/apache/apisix/pull/2596#discussion_r518459588



##########
File path: t/plugin/log-rotate.t
##########
@@ -95,11 +95,89 @@ GET /t
             ngx.say("done")
         }
     }
---- request
-GET /t
 --- response_body
 done
 --- no_error_log
 [error]
 --- error_log
 start xxxxxx
+
+
+
+=== TEST 3: fix: ensure only one timer is running
+--- config
+    location /t {
+        content_by_lua_block {
+            ngx.sleep(0.5)
+            local t = require("lib.test_admin").test
+            local code, _, org_body = t('/apisix/admin/plugins/reload',
+                                        ngx.HTTP_PUT)

Review comment:
       @Firstsawyou 
   No. I like the indentation now, which I can see it is a PUT request at the first glance.
   We make a new line not just because the old one is too long, but also make the important part of code easier to notice.




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

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