[php-src] Issue #15457: Drop support for MYSQL_TEST_SKIP_CONNECT_FAILURE
| From: | cmb69 | Date: | Sat, 17 Aug 2024 10:11:57 +0000 |
| Subject: | [php-src] Issue #15457: Drop support for MYSQL_TEST_SKIP_CONNECT_FAILURE | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247519@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15457
Author: cmb69
### Description
Many mysqli tests are checking the environment variable
MYSQL_TEST_SKIP_CONNECT_FAILURE
which defaults to true, and if not overridden, they are skipped instead of failing. I can see no
good reason to not skip a test if the connection to the database server can't be established
(and as far as I know, other extensions don't have this mechanism).
Note that support for this environment variable has been introduced in commit
534f770ae20f3ef98eaa4d597eccc9945a7d7e83, with the message: "Trying to make them not fail but
skip if they cannot connect to the DB." So back then it likely has been an attempt to make it
possible to keep the old behavior, but nonetheless switch to a more sensible behavior by default.
However, nowadays that does not make much sense, since a lot of tests ignore this environment
variable, because they use test_helpers.inc in the SKIPIF section, instead of
skipifconnectfailure.inc, and the former is ignorant about that environment variable.
So I suggest to drop the half-baked support for that environment variable altogether. This would
already provide a more consistent testing experience ("why isn't this test failing
although I have set MYSQL_TEST_SKIP_CONNECT_FAILURE"), and would pave the way for
some simplifications of the test helpers in the near future.
Any thoughts?