-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(plugin): test for fix of otel reconfigure issue #KAG-1061 #10666
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the title of the PR to describe the issue. Also update the summary in the description to include the problem, the root cause and the solution. It currently seems to say that this PR fixes an issue where in reality the issue was fixed by the queueing changes and what it contains is just the regression test.
|
||
it("test", function () | ||
local client = assert(helpers.proxy_client()) | ||
local res = assert(client:send { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer client:get
as that includes the assert()
invocation.
@@ -1345,6 +1345,183 @@ local function http_server(port, opts) | |||
end | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code below seems to duplicate helpers.http_server
. Is it possible to improve that instead of adding a second mock http server implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a duplication. http_server
uses threads and http_mock
uses coroutines. The coroutine implementation is more deterministic and thus less flaky, but we choose to not retire http_server
for now as it involves a lot of changes in the test suit (plus I need to convince people to switch to this).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment to the threads based implementation, pointing out that http_mock
should be used instead, and open a KAG ticket "Replace usage of helpers.http_server
by helpers.http_mock
".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refer to https://konghq.atlassian.net/browse/KAG-1148
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would still like to see a deprecation comment in helpers.lua to make people aware of the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hanshuebner I've added comments to http_server
.
56a2ffd
to
2932747
Compare
Summary
Improvement of batch queue fixed the OTEL reconfigure issue.
This PR adds a test to verify the fix.
Checklist
There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HEREN/AFull changelog
Issue reference
Test of KAG-1061