Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2cdcae9

Browse files
committed
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 notinstalled by default.This commit adds a workaround based on a scan of pg_available_extensionsto 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 thisaddresses only the tests that exist on HEAD and v17 as the release isclose by.Reported-by: Maxim OrlovDiscussion:https://postgr.es/m/CACG=ezZkoT-pFz6a9XnyToiuR-Wg8fGELqHLoyBodr+2h-77qA@mail.gmail.comBackpatch-through: 17
1 parent12d3345 commit2cdcae9

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

‎src/test/modules/test_misc/t/005_timeouts.pl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@
2424
my$node = PostgreSQL::Test::Cluster->new('master');
2525
$node->init();
2626
$node->start;
27+
28+
# Check if the extension injection_points is available, as it may be
29+
# possible that this script is run with installcheck, where the module
30+
# would not be installed by default.
31+
my$result =$node->safe_psql('postgres',
32+
"SELECT count(*) > 0 FROM pg_available_extensions WHERE name = 'injection_points';"
33+
);
34+
if ($resulteq'f')
35+
{
36+
planskip_all=>'Extension injection_points not installed';
37+
}
38+
2739
$node->safe_psql('postgres','CREATE EXTENSION injection_points;');
2840

2941
#

‎src/test/recovery/t/041_checkpoint_at_promote.pl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@
3535
]);
3636
$node_primary->start;
3737

38+
# Check if the extension injection_points is available, as it may be
39+
# possible that this script is run with installcheck, where the module
40+
# would not be installed by default.
41+
my$result =$node_primary->safe_psql('postgres',
42+
"SELECT count(*) > 0 FROM pg_available_extensions WHERE name = 'injection_points';"
43+
);
44+
if ($resulteq'f')
45+
{
46+
planskip_all=>'Extension injection_points not installed';
47+
}
48+
3849
my$backup_name ='my_backup';
3950
$node_primary->backup($backup_name);
4051

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp