summaryrefslogtreecommitdiff
path: root/contrib/amcheck
diff options
context:
space:
mode:
authorDaniel Gustafsson2022-02-11 19:54:44 +0000
committerDaniel Gustafsson2022-02-11 19:54:44 +0000
commit549ec201d6132b7c7ee11ee90a4e02119259ba5b (patch)
tree44c1669ef24c66233c16b2fa77aff148596f67a7 /contrib/amcheck
parent751b8d23b788580bbff7463e3959f9a92a95b28a (diff)
Replace Test::More plans with done_testing
Rather than doing manual book keeping to plan the number of tests to run in each TAP suite, conclude each run with done_testing() summing up the the number of tests that ran. This removes the need for maintaning and updating the plan count at the expense of an accurate count of remaining during the test suite runtime. This patch has been discussed a number of times, often in the context of other patches which updates tests, so a larger number of discussions can be found in the archives. Reviewed-by: Julien Rouhaud <rjuju123@gmail.com> Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Discussion: https://postgr.es/m/DD399313-3D56-4666-8079-88949DAC870F@yesql.se
Diffstat (limited to 'contrib/amcheck')
-rw-r--r--contrib/amcheck/t/001_verify_heapam.pl4
-rw-r--r--contrib/amcheck/t/002_cic.pl2
-rw-r--r--contrib/amcheck/t/003_cic_2pc.pl2
3 files changed, 5 insertions, 3 deletions
diff --git a/contrib/amcheck/t/001_verify_heapam.pl b/contrib/amcheck/t/001_verify_heapam.pl
index 39c11634b85..bb0997cd5d9 100644
--- a/contrib/amcheck/t/001_verify_heapam.pl
+++ b/contrib/amcheck/t/001_verify_heapam.pl
@@ -8,7 +8,7 @@ use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Fcntl qw(:seek);
-use Test::More tests => 272;
+use Test::More;
my ($node, $result);
@@ -283,3 +283,5 @@ sub check_all_options_uncorrupted
}
}
}
+
+done_testing();
diff --git a/contrib/amcheck/t/002_cic.pl b/contrib/amcheck/t/002_cic.pl
index f6b91e89ad3..d604def0d02 100644
--- a/contrib/amcheck/t/002_cic.pl
+++ b/contrib/amcheck/t/002_cic.pl
@@ -9,7 +9,7 @@ use Config;
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
-use Test::More tests => 3;
+use Test::More;
my ($node, $result);
diff --git a/contrib/amcheck/t/003_cic_2pc.pl b/contrib/amcheck/t/003_cic_2pc.pl
index 44b425f5587..f668ed3c40a 100644
--- a/contrib/amcheck/t/003_cic_2pc.pl
+++ b/contrib/amcheck/t/003_cic_2pc.pl
@@ -9,7 +9,7 @@ use Config;
use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
-use Test::More tests => 5;
+use Test::More;
Test::More->builder->todo_start('filesystem bug')
if PostgreSQL::Test::Utils::has_wal_read_bug;