File tree Expand file tree Collapse file tree 1 file changed +37
-10
lines changed Expand file tree Collapse file tree 1 file changed +37
-10
lines changed Original file line number Diff line number Diff line change 66
77use strict;
88use warnings;
9- use PostgresNode;
10- use TestLib;
119use Test::More;
1210
11+ my $pg_15_modules ;
12+
13+ BEGIN
14+ {
15+ $pg_15_modules = eval
16+ {
17+ require PostgreSQL::Test::Cluster;
18+ require PostgreSQL::Test::Utils;
19+ return 1;
20+ };
21+
22+ unless (defined $pg_15_modules )
23+ {
24+ $pg_15_modules = 0;
25+
26+ require PostgresNode;
27+ require TestLib;
28+ }
29+ }
30+
1331plan tests => 24;
1432
33+ note(' PostgreSQL 15 modules are used: ' . ($pg_15_modules ? ' yes' : ' no' ));
34+
1535my $node ;
1636my $res ;
1737my $res_stdout ;
1838my $res_stderr ;
1939
20- # Initialize node
21- # Older version of PostgresNode.pm use get_new_node function.
22- # Newer use standard perl object constructor syntax
23- if (PostgresNode-> can(' get_new_node' )) {
24- $node = get_new_node(' node' );
25- } else {
26- $node = PostgresNode-> new(" node" );
27- }
40+ # Create node.
41+ # Older versions of PostgreSQL modules use get_new_node function.
42+ # Newer use standard perl object constructor syntax.
43+ eval
44+ {
45+ if ($pg_15_modules )
46+ {
47+ $node = PostgreSQL::Test::Cluster-> new(" node" );
48+ }
49+ else
50+ {
51+ $node = PostgresNode::get_new_node(" node" );
52+ }
53+ };
54+
2855$node -> init;
2956$node -> start;
3057
You can’t perform that action at this time.
0 commit comments