zaunist commented on pull request #6202: URL: https://github.com/apache/apisix/pull/6202#issuecomment-1043775705
In the end, I decided to use etcd.set instead of etcd.atomic_set for the following reasons. 1. Atomic_set performs transactions, and in the test case, calling Apache APISIX reload interface would result in two transactions being performed in a short period of time. Apache APISIX would start once and reload would be called again, which would make the rest of the test case unstable. The error message just like it: https://github.com/apache/apisix/runs/5179696756?check_suite_focus=true#step:10:657 - The first init in https://github.com/apache/apisix/blob/f37fc0eb77abbf7fdf98ea40ce706d75e5582a4b/apisix/plugins/server-info.lua#L205 - The second init in https://github.com/apache/apisix/blob/f37fc0eb77abbf7fdf98ea40ce706d75e5582a4b/apisix/plugin.lua#L152 2. Using etcd.set does the same thing as etcd.atomic_set, and there is no strong need to use etcd.atomic_set. For server-info test-case: I tried to change the hostname using exec, but `sudo hostname` doesn't seem to work in the test framework. https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md#executing-shell-commands Does anyone have any suggestions? -- 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]
