mirror of https://github.com/sysown/proxysql
The reg_test_unexp_ping_pkt TAP failure on legacy-g2 was caused by multiple test-side issues that became visible after moving from host-local 127.0.0.1 execution with port mapping to isolated Docker containers on a private network.
The first failure happened during the initial setup path: the test connected with ProxySQL root credentials and root host, but used cl.mysql_port instead of cl.root_port. In the old port-mapped layout this mistake could be masked more easily. In the isolated DNS-based setup used by legacy-g2, root/admin/frontend and backend ports are distinct and the mismatch causes an immediate connect failure. This change routes the setup connections through the correct ProxySQL root port and adds targeted connection diagnostics so future CI failures show the exact host, port, user, and MySQL error involved.
The second failure was a latent prepared-statement bug in the test data loader. MYSQL_BIND.length pointed to a block-local variable that went out of scope before mysql_stmt_execute(), which led to intermittent or immediate client-side failures such as 'Client run out of memory' when inserting the large LONGTEXT payload used by the test. This change keeps the bound length alive for the full execution window and adds payload-size logging so the expensive setup phase is visible in TAP logs.
The final failure was in metric validation, not in ProxySQL behavior. ProxySQL exports proxysql_mysql_unexpected_frontend_com_ping_total as a labeled Prometheus series, for example with {protocol="mysql"}. The test previously looked up the metric by exact key, which silently read zero from the parsed map and made the assertion fail even though ProxySQL was correctly detecting and handling the unexpected COM_PING packets. This change resolves the metric by prefix, records how many matching series were found, and logs the before/after values and delta explicitly.
Verification:
- rebuilt test/tap/tests/reg_test_unexp_ping_pkt-t
- executed the test directly against the live legacy-g2 ProxySQL instance and observed ok 9 / exit 0
- executed the isolated CI-style path with TEST_PY_TAP_INCL=reg_test_unexp_ping_pkt-t via test/infra/control/run-tests-isolated.bash and observed PASS 1/294 : FAIL 0/294
This commit intentionally does not include unrelated orchestrator configuration edits that were already present in the worktree.
pull/5453/head
parent
98c03d6fc6
commit
7384bea084
Loading…
Reference in new issue