summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2025-12-05 09:21:13 +0900
committerMichael Paquier <michael@paquier.xyz>2025-12-05 09:21:13 +0900
commit83f2f8413e8d9687fda7d5881c82b89b8d9d4043 (patch)
treed8f9703e21b5d71c276a000f9611c4f119190859 /src
parent904f9f5ea0e00a88e2429682d01f2ec946bf553a (diff)
Show version of nodes in output of TAP tests
This commit adds the version information of a node initialized by Cluster.pm, that may vary depending on the install_path given by the test. The code was written so as the node information, that includes the version number, was dumped before the version number was set. This is particularly useful for the pg_upgrade TAP tests, that may mix several versions for cross-version runs. The TAP infrastructure also allows mixing nodes with different versions, so this information can be useful for out-of-core tests. Backpatch down to v15, where Cluster.pm and the pg_upgrade TAP tests have been introduced. Author: Potapov Alexander <a.potapov@postgrespro.com> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://postgr.es/m/e59bb-692c0a80-5-6f987180@170377126 Backpatch-through: 15
Diffstat (limited to 'src')
-rw-r--r--src/test/perl/PostgreSQL/Test/Cluster.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index 35413f14019..747528c4af1 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -1647,10 +1647,10 @@ sub new
or
BAIL_OUT("could not create data directory \"$node->{_basedir}\": $!");
- $node->dump_info;
-
$node->_set_pg_version;
+ $node->dump_info;
+
my $ver = $node->{_pg_version};
# Use a subclass as defined below (or elsewhere) if this version