| Bug #38475 | Proxy-Unit-Tests cannot be run agains multiple backends (run-tests.lua) | ||
|---|---|---|---|
| Submitted: | 30 Jul 2008 23:09 | Modified: | 9 Mar 2009 22:31 |
| Reporter: | Peter Romianowski | Email Updates: | |
| Status: | No Feedback | Impact on me: | |
| Category: | MySQL Proxy | Severity: | S3 (Non-critical) |
| Version: | 6.0.1 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[9 Feb 2009 22:31]
Sveta Smirnova
Thank you for the report. But specifying multiple backends works for me at least since revision 468. Please try current version 0.7.0 and if problem still exists in your environment provide test case which shows wrong behavior.
[10 Mar 2009 0:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".

Description: You cannot pass multiple --proxy-backend-addresses to the proxy. How to repeat: see above and below Suggested fix: Rewrite options_tostring() in run-test.lua to: function options_tostring(tbl, sep) -- default value for sep sep = sep or " " assert(type(tbl) == "table") assert(type(sep) == "string") local s = "" for k, v in pairs(tbl) do local value_map = {v} if (type(v) == "table") then value_map = v; end for _, value in ipairs(value_map) do local enc_value = value:gsub("\\", "\\\\"):gsub("\"", "\\\"") s = s .. "--" .. k .. "=\"" .. enc_value .. "\" " end end -- print_verbose(" option: " .. s) return s end Now you can provide multiple backends like this: start_proxy("myProxy", { ["proxy-backend-addresses"] = {"127.0.0.1:17152", "127.0.0.1:17153", "127.0.0.1:17154"}, ... } )