sshniro commented on pull request #2026:
URL: https://github.com/apache/apisix/pull/2026#issuecomment-671208112
@membphis small question why does consequent calls to the endpoint returns
the same value to the header? However if I call this endpoint via curl I do get
different results. Is this something related to UUID seed not getting set in
unit tests?
```shell
=== TEST X: check for unique id
--- config
location /t {
content_by_lua_block {
local http = require "resty.http"
local httpc = http.new()
local uri = "http://127.0.0.1:" .. ngx.var.server_port ..
"/opentracing"
local res1, err1 = httpc:request_uri(uri,
{
method = "GET",
headers = {
["Content-Type"] = "application/json",
}
})
local res2, err2 = httpc:request_uri(uri,
{
method = "GET",
headers = {
["Content-Type"] = "application/json",
}
})
if res1.headers["X-Request-Id"] ~= res2.headers["X-Request-Id"]
then
ngx.say("unique request id")
else
ngx.say("failed")
end
}
}
--- request
GET /t
--- response_body
unique request id
--- no_error_log
[error]
```
----------------------------------------------------------------
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:
[email protected]