Avoid installcheck failure in TAP tests using injection_points
authorMichael Paquier <michael@paquier.xyz>
Tue, 3 Sep 2024 23:56:23 +0000 (08:56 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 3 Sep 2024 23:56:23 +0000 (08:56 +0900)
commit2cdcae9da6968ed1057bfc67442fd9e0dcbbc31d
treefbd664727786a2d4444a59fe9bb02aa58705c50e
parent12d3345c0d2842a36d0ee2bce06cfe7d3cac84da
Avoid installcheck failure in TAP tests using injection_points

These tests depend on the test module injection_points to be installed,
but it may not be available as the contents of src/test/modules/ are not
installed by default.

This commit adds a workaround based on a scan of pg_available_extensions
to check if the extension is available, skipping the test if it is not.
This allows installcheck to work transparently.

There are more tests impacted by this problem on HEAD, but for now this
addresses only the tests that exist on HEAD and v17 as the release is
close by.

Reported-by: Maxim Orlov
Discussion: https://postgr.es/m/CACG=ezZkoT-pFz6a9XnyToiuR-Wg8fGELqHLoyBodr+2h-77qA@mail.gmail.com
Backpatch-through: 17
src/test/modules/test_misc/t/005_timeouts.pl
src/test/recovery/t/041_checkpoint_at_promote.pl