This is an automated email from the ASF dual-hosted git repository.
AlinsRan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 96a5b43d5 test(skywalking): remove worker-0 dependency in backend
timer assertion (#13902)
96a5b43d5 is described below
commit 96a5b43d521322be96128b0eb9d3aa7df76ce363
Author: Mohammad Izzraff Janius
<[email protected]>
AuthorDate: Tue Sep 1 18:24:37 2026 +0900
test(skywalking): remove worker-0 dependency in backend timer assertion
(#13902)
---
t/plugin/skywalking2.t | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/t/plugin/skywalking2.t b/t/plugin/skywalking2.t
index 80748ada3..05bed8813 100644
--- a/t/plugin/skywalking2.t
+++ b/t/plugin/skywalking2.t
@@ -65,9 +65,8 @@ _EOC_
end
end
- if 0 == ngx.worker.id() then
- -- patch: skywalking2
- -- Ensure that it is executed only once
+ -- patch: skywalking2
+ if metadata_buffer:add("backend_timer_started", true) then
ngx.log(ngx.INFO, "start skywalking backend timer")
local ok, err = new_timer(self.backendTimerDelay, check)
if not ok then
@@ -149,12 +148,6 @@ passed
local http = require "resty.http"
local uri = "http://127.0.0.1:" .. ngx.var.server_port
.. "/opentracing"
- local ports_count = {}
- -- The patched startBackendTimer only logs when ngx.worker.id()==0,
- -- so we need at least one connection to land on worker 0. With
- -- workers(4) and keepalive=false, 12 requests gave a ~3% chance
- -- of missing worker 0 entirely; bump to 50 to make that
vanishingly
- -- unlikely (~0.0006%).
for i = 1, 50 do
local httpc = http.new()
local res, err = httpc:request_uri(uri, {method = "GET",
keepalive = false})