Replace Test::More plans with done_testing
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Fri, 11 Feb 2022 19:54:44 +0000 (20:54 +0100)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Fri, 11 Feb 2022 19:54:44 +0000 (20:54 +0100)
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

139 files changed:
contrib/amcheck/t/001_verify_heapam.pl
contrib/amcheck/t/002_cic.pl
contrib/amcheck/t/003_cic_2pc.pl
contrib/auto_explain/t/001_auto_explain.pl
contrib/bloom/t/001_wal.pl
contrib/oid2name/t/001_basic.pl
contrib/test_decoding/t/001_repl_stats.pl
contrib/vacuumlo/t/001_basic.pl
src/bin/initdb/t/001_initdb.pl
src/bin/pg_amcheck/t/001_basic.pl
src/bin/pg_amcheck/t/002_nonesuch.pl
src/bin/pg_amcheck/t/003_check.pl
src/bin/pg_amcheck/t/004_verify_heapam.pl
src/bin/pg_amcheck/t/005_opclass_damage.pl
src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl
src/bin/pg_basebackup/t/020_pg_receivewal.pl
src/bin/pg_basebackup/t/030_pg_recvlogical.pl
src/bin/pg_checksums/t/001_basic.pl
src/bin/pg_checksums/t/002_actions.pl
src/bin/pg_config/t/001_pg_config.pl
src/bin/pg_controldata/t/001_pg_controldata.pl
src/bin/pg_ctl/t/001_start_stop.pl
src/bin/pg_ctl/t/002_status.pl
src/bin/pg_ctl/t/003_promote.pl
src/bin/pg_ctl/t/004_logrotate.pl
src/bin/pg_dump/t/001_basic.pl
src/bin/pg_dump/t/002_pg_dump.pl
src/bin/pg_dump/t/003_pg_dump_with_server.pl
src/bin/pg_dump/t/010_dump_connstr.pl
src/bin/pg_resetwal/t/001_basic.pl
src/bin/pg_resetwal/t/002_corrupted.pl
src/bin/pg_rewind/t/001_basic.pl
src/bin/pg_rewind/t/002_databases.pl
src/bin/pg_rewind/t/003_extrafiles.pl
src/bin/pg_rewind/t/004_pg_xlog_symlink.pl
src/bin/pg_rewind/t/005_same_timeline.pl
src/bin/pg_rewind/t/006_options.pl
src/bin/pg_rewind/t/007_standby_source.pl
src/bin/pg_rewind/t/008_min_recovery_point.pl
src/bin/pg_test_fsync/t/001_basic.pl
src/bin/pg_test_timing/t/001_basic.pl
src/bin/pg_verifybackup/t/001_basic.pl
src/bin/pg_verifybackup/t/002_algorithm.pl
src/bin/pg_verifybackup/t/003_corruption.pl
src/bin/pg_verifybackup/t/004_options.pl
src/bin/pg_verifybackup/t/005_bad_manifest.pl
src/bin/pg_verifybackup/t/006_encoding.pl
src/bin/pg_verifybackup/t/007_wal.pl
src/bin/pg_verifybackup/t/008_untar.pl
src/bin/pg_verifybackup/t/009_extract.pl
src/bin/pg_verifybackup/t/010_client_untar.pl
src/bin/pg_waldump/t/001_basic.pl
src/bin/psql/t/001_basic.pl
src/bin/psql/t/020_cancel.pl
src/bin/scripts/t/010_clusterdb.pl
src/bin/scripts/t/011_clusterdb_all.pl
src/bin/scripts/t/020_createdb.pl
src/bin/scripts/t/040_createuser.pl
src/bin/scripts/t/050_dropdb.pl
src/bin/scripts/t/070_dropuser.pl
src/bin/scripts/t/080_pg_isready.pl
src/bin/scripts/t/090_reindexdb.pl
src/bin/scripts/t/091_reindexdb_all.pl
src/bin/scripts/t/100_vacuumdb.pl
src/bin/scripts/t/101_vacuumdb_all.pl
src/bin/scripts/t/102_vacuumdb_stages.pl
src/bin/scripts/t/200_connstr.pl
src/test/authentication/t/001_password.pl
src/test/authentication/t/002_saslprep.pl
src/test/kerberos/t/001_auth.pl
src/test/ldap/t/001_auth.pl
src/test/modules/brin/t/01_workitems.pl
src/test/modules/commit_ts/t/001_base.pl
src/test/modules/commit_ts/t/002_standby.pl
src/test/modules/commit_ts/t/003_standby_2.pl
src/test/modules/commit_ts/t/004_restart.pl
src/test/modules/test_misc/t/001_constraint_validation.pl
src/test/modules/test_misc/t/002_tablespace.pl
src/test/modules/test_misc/t/003_check_guc.pl
src/test/modules/test_pg_dump/t/001_base.pl
src/test/perl/README
src/test/recovery/t/001_stream_rep.pl
src/test/recovery/t/002_archiving.pl
src/test/recovery/t/003_recovery_targets.pl
src/test/recovery/t/004_timeline_switch.pl
src/test/recovery/t/005_replay_delay.pl
src/test/recovery/t/006_logical_decoding.pl
src/test/recovery/t/007_sync_rep.pl
src/test/recovery/t/008_fsm_truncation.pl
src/test/recovery/t/009_twophase.pl
src/test/recovery/t/010_logical_decoding_timelines.pl
src/test/recovery/t/011_crash_recovery.pl
src/test/recovery/t/012_subtransactions.pl
src/test/recovery/t/013_crash_restart.pl
src/test/recovery/t/014_unlogged_reinit.pl
src/test/recovery/t/015_promotion_pages.pl
src/test/recovery/t/016_min_consistency.pl
src/test/recovery/t/017_shm.pl
src/test/recovery/t/018_wal_optimize.pl
src/test/recovery/t/019_replslot_limit.pl
src/test/recovery/t/020_archive_status.pl
src/test/recovery/t/021_row_visibility.pl
src/test/recovery/t/022_crash_temp_files.pl
src/test/recovery/t/023_pitr_prepared_xact.pl
src/test/recovery/t/024_archive_recovery.pl
src/test/recovery/t/025_stuck_on_old_timeline.pl
src/test/recovery/t/026_overwrite_contrecord.pl
src/test/recovery/t/027_stream_regress.pl
src/test/ssl/t/001_ssltests.pl
src/test/ssl/t/002_scram.pl
src/test/ssl/t/003_sslinfo.pl
src/test/subscription/t/001_rep_changes.pl
src/test/subscription/t/002_types.pl
src/test/subscription/t/003_constraints.pl
src/test/subscription/t/004_sync.pl
src/test/subscription/t/005_encoding.pl
src/test/subscription/t/006_rewrite.pl
src/test/subscription/t/007_ddl.pl
src/test/subscription/t/008_diff_schema.pl
src/test/subscription/t/009_matviews.pl
src/test/subscription/t/010_truncate.pl
src/test/subscription/t/011_generated.pl
src/test/subscription/t/012_collation.pl
src/test/subscription/t/013_partition.pl
src/test/subscription/t/014_binary.pl
src/test/subscription/t/015_stream.pl
src/test/subscription/t/016_stream_subxact.pl
src/test/subscription/t/017_stream_ddl.pl
src/test/subscription/t/018_stream_subxact_abort.pl
src/test/subscription/t/019_stream_subxact_ddl_abort.pl
src/test/subscription/t/020_messages.pl
src/test/subscription/t/021_twophase.pl
src/test/subscription/t/022_twophase_cascade.pl
src/test/subscription/t/023_twophase_stream.pl
src/test/subscription/t/024_add_drop_pub.pl
src/test/subscription/t/025_rep_changes_for_schema.pl
src/test/subscription/t/026_worker_stats.pl
src/test/subscription/t/027_nosuperuser.pl
src/test/subscription/t/100_bugs.pl

index 39c11634b85e30bea74122720dd778b4b9f660a8..bb0997cd5d95f431f1ffd27b577f03393c65360c 100644 (file)
@@ -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();
index f6b91e89ad32200173bc644c1c6e55c2037792f6..d604def0d02d1eb145061958e7df3659742f7242 100644 (file)
@@ -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);
 
index 44b425f5587c0ec83f313e0b452379d9ee66fa59..f668ed3c40ad3a243ffdbe4d67887185497b8550 100644 (file)
@@ -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;
index 1fbfd6d1ddb858bcc8d28ce9afccc976ae41a4f3..82e4d9d15cdef06a4e1d8b2a6adea16126e7438e 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 4;
+use Test::More;
 
 my $node = PostgreSQL::Test::Cluster->new('main');
 $node->init;
@@ -53,3 +53,5 @@ like(
        $log_contents,
        qr/"Node Type": "Index Scan"[^}]*"Index Name": "pg_class_relname_nsp_index"/s,
        "index scan logged, json mode");
+
+done_testing();
index 06e664688a01ddc0c160ad19bd02a15d40480359..9416a64dbd6841142b5ab65ebf3168028db6fc31 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 31;
+use Test::More;
 
 my $node_primary;
 my $node_standby;
@@ -80,3 +80,5 @@ for my $i (1 .. 10)
        );
        test_index_replay("insert $i");
 }
+
+done_testing();
index e38d893b9b9024e107962cb58a27e034442e0cfc..671bdbde140c5d8b0ad61cf72b2083a91eeecd16 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 
 use PostgreSQL::Test::Utils;
-use Test::More tests => 8;
+use Test::More;
 
 #########################################
 # Basic checks
@@ -13,3 +13,5 @@ use Test::More tests => 8;
 program_help_ok('oid2name');
 program_version_ok('oid2name');
 program_options_handling_ok('oid2name');
+
+done_testing();
index 36fb36e665f0fa3d2558d7c692d92e2bcf4bfe88..fd82244a15c25b9db8ea58cc7c48f1d142bb2279 100644 (file)
@@ -8,7 +8,7 @@ use warnings;
 use File::Path qw(rmtree);
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 2;
+use Test::More;
 
 # Test set-up
 my $node = PostgreSQL::Test::Cluster->new('test');
@@ -118,3 +118,5 @@ $node->safe_psql('postgres',
 
 # shutdown
 $node->stop;
+
+done_testing();
index b7a84cf92ea0c47b22ac9f70e4ff082aa74b4a9b..f4bfb2a1c3cce6457ded2231dbafebc0cc099cc5 100644 (file)
@@ -5,8 +5,10 @@ use strict;
 use warnings;
 
 use PostgreSQL::Test::Utils;
-use Test::More tests => 8;
+use Test::More;
 
 program_help_ok('vacuumlo');
 program_version_ok('vacuumlo');
 program_options_handling_ok('vacuumlo');
+
+done_testing();
index 02bc688a3b90acceb713d9c9b06c0e9afca8692c..7dc8cdd855bf34520ed72290422aeb64903cd8d6 100644 (file)
@@ -11,7 +11,7 @@ use Fcntl ':mode';
 use File::stat qw{lstat};
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 22;
+use Test::More;
 
 my $tempdir = PostgreSQL::Test::Utils::tempdir;
 my $xlogdir = "$tempdir/pgxlog";
@@ -92,3 +92,5 @@ SKIP:
        ok(check_mode_recursive($datadir_group, 0750, 0640),
                'check PGDATA permissions');
 }
+
+done_testing();
index 4bb9d91dfb89fe91137da34b12eb7e6affc9b687..e27312862e73659e4f945c6a15cf7dcd21e49995 100644 (file)
@@ -5,8 +5,10 @@ use strict;
 use warnings;
 
 use PostgreSQL::Test::Utils;
-use Test::More tests => 8;
+use Test::More;
 
 program_help_ok('pg_amcheck');
 program_version_ok('pg_amcheck');
 program_options_handling_ok('pg_amcheck');
+
+done_testing();
index 8d7bd7ebccdd6c5fba599e002d4901cfeeeabcfe..56d55199f84b02ec997c20efc8c5c683feded916 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 76;
+use Test::More;
 
 # Test set-up
 my ($node, $port);
@@ -268,3 +268,5 @@ $node->command_checks_all(
                qr/pg_amcheck: error: no relations to check/
        ],
        'schema exclusion pattern overrides all inclusion patterns');
+
+done_testing();
index 9df027b37f065b73ec29ab55006ac8c25a8cf5d1..d984eacb24f2326d3ef80f6d52e4567247370913 100644 (file)
@@ -8,7 +8,7 @@ use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
 
 use Fcntl qw(:seek);
-use Test::More tests => 63;
+use Test::More;
 
 my ($node, $port, %corrupt_page, %remove_relation);
 
@@ -517,3 +517,5 @@ $node->command_checks_all(
        [ @cmd, '-d', 'db1', '-d', 'db2', '-d', 'db3', '-S', 's*' ],
        0, [$no_output_re], [$no_output_re],
        'pg_amcheck excluding all corrupt schemas');
+
+done_testing();
index 84e75862769b58ff3e0c0b45c402a718a226c825..94d691a614d4b9c21e940e6e5f3b1cb16be3d1c3 100644 (file)
@@ -297,7 +297,6 @@ close($file)
 $node->start;
 
 # Ok, Xids and page layout look ok.  We can run corruption tests.
-plan tests => 19;
 
 # Check that pg_amcheck runs against the uncorrupted table without error.
 $node->command_ok(
@@ -528,3 +527,5 @@ $node->command_checks_all(
 
 $node->teardown_node;
 $node->clean_node;
+
+done_testing();
index d81c9583de2c351c55d2d65ed954800cefb68912..a5e820827007111da0194682939f3552cd43e670 100644 (file)
@@ -8,7 +8,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 5;
+use Test::More;
 
 my $node = PostgreSQL::Test::Cluster->new('test');
 $node->init;
@@ -57,3 +57,5 @@ $node->command_checks_all(
        [],
        'pg_amcheck all schemas, tables and indexes reports fickleidx corruption'
 );
+
+done_testing();
index 60331e0a17ea0062c65e098581b15864e9746b92..4894a2e48390df8b5443dceaabbda6a1eefe561e 100644 (file)
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 42;
+use Test::More;
 
 program_help_ok('pg_archivecleanup');
 program_version_ok('pg_archivecleanup');
@@ -101,3 +101,5 @@ sub run_check
 run_check('',                 'pg_archivecleanup');
 run_check('.partial',         'pg_archivecleanup with .partial file');
 run_check('.00000020.backup', 'pg_archivecleanup with .backup file');
+
+done_testing();
index 98dbdab595cae8da78c8adeae97f71d15a5fc7e8..0e6e685aa692f06802c40ac8266c2f42f8154795 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Utils;
 use PostgreSQL::Test::Cluster;
-use Test::More tests => 42;
+use Test::More;
 
 program_help_ok('pg_receivewal');
 program_version_ok('pg_receivewal');
@@ -334,3 +334,5 @@ ok(-e "$timeline_dir/$walfile_after_promotion",
        "WAL segment $walfile_after_promotion archived after timeline jump");
 ok(-e "$timeline_dir/00000002.history",
        "timeline history file archived after timeline jump");
+
+done_testing();
index 64f2f571fdbf2dc56d40a02ccfd0c3f553c2e4de..201196f95732b7730cde3743ea33dfcc231e6274 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Utils;
 use PostgreSQL::Test::Cluster;
-use Test::More tests => 20;
+use Test::More;
 
 program_help_ok('pg_recvlogical');
 program_version_ok('pg_recvlogical');
@@ -106,3 +106,5 @@ $node->command_ok(
                '--start', '--endpos', "$nextlsn", '--no-loop', '-f', '-'
        ],
        'replayed a two-phase transaction');
+
+done_testing();
index fd03e8df0f68ae8f5e837c2870a968e497e80cdf..d7cede111e9347a73d0317ac93b4b5963133a077 100644 (file)
@@ -4,8 +4,10 @@
 use strict;
 use warnings;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 8;
+use Test::More;
 
 program_help_ok('pg_checksums');
 program_version_ok('pg_checksums');
 program_options_handling_ok('pg_checksums');
+
+done_testing();
index 7b515dfc6d1e05ad54d11566245e5e5c3bacf312..5563244f11e9a802fb72b6f9a957af73199000f0 100644 (file)
@@ -11,7 +11,7 @@ use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
 
 use Fcntl qw(:seek);
-use Test::More tests => 66;
+use Test::More;
 
 
 # Utility routine to create and check a table with corrupted checksums
@@ -257,3 +257,5 @@ fail_corrupt($node, "99990_vm");
 fail_corrupt($node, "99990_init.123");
 fail_corrupt($node, "99990_fsm.123");
 fail_corrupt($node, "99990_vm.123");
+
+done_testing();
index cff4d6ebc90f381df5de0e82ad391b360489b640..9a8910906881cd6fb628681408eacb348a605c20 100644 (file)
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 20;
+use Test::More;
 
 program_help_ok('pg_config');
 program_version_ok('pg_config');
@@ -17,3 +17,5 @@ command_like([ 'pg_config', '--libdir', '--bindir' ],
        qr/lib.*\n.*bin/, 'pg_config two options different order');
 command_like(['pg_config'], qr/.*\n.*\n.*/,
        'pg_config without options prints many lines');
+
+done_testing();
index 2f02966bf43840e4df4217a85a8cdb42cb12700a..adb9af4e938a496df465f99bea283403e804b97c 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 17;
+use Test::More;
 
 program_help_ok('pg_controldata');
 program_version_ok('pg_controldata');
@@ -42,3 +42,5 @@ command_checks_all(
        ],
        [qr/^$/],
        'pg_controldata with corrupted pg_control');
+
+done_testing();
index a084d09cd4975c1ef27d6e1ee9e609c8c935c34f..7d3fbc3f6a93c15eabcae548a2cb70d583aa160b 100644 (file)
@@ -9,7 +9,7 @@ use Fcntl ':mode';
 use File::stat qw{lstat};
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 24;
+use Test::More;
 
 my $tempdir       = PostgreSQL::Test::Utils::tempdir;
 my $tempdir_short = PostgreSQL::Test::Utils::tempdir_short;
@@ -111,3 +111,5 @@ command_ok([ 'pg_ctl', 'restart', '-D', "$tempdir/data" ],
        'pg_ctl restart with server running');
 
 system_or_bail 'pg_ctl', 'stop', '-D', "$tempdir/data";
+
+done_testing();
index 38c901f88a1a51e9b8ff399d0ec20028fd48be4c..2503d74a76d46ea8f25c40b8a162cdf04ead4698 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 3;
+use Test::More;
 
 my $tempdir       = PostgreSQL::Test::Utils::tempdir;
 
@@ -25,3 +25,5 @@ command_exit_is([ 'pg_ctl', 'status', '-D', $node->data_dir ],
        0, 'pg_ctl status with server running');
 
 system_or_bail 'pg_ctl', 'stop', '-D', $node->data_dir;
+
+done_testing();
index b14bf1d7b04aa1429f4bfd46a9306de39880ec41..84d28f4c77571586978e7e6a66c41e8bb84ec28a 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 12;
+use Test::More;
 
 my $tempdir = PostgreSQL::Test::Utils::tempdir;
 
@@ -62,3 +62,5 @@ command_ok([ 'pg_ctl', '-D', $node_standby->data_dir, 'promote' ],
 
 is($node_standby->safe_psql('postgres', 'SELECT pg_is_in_recovery()'),
        'f', 'promoted standby is not in recovery');
+
+done_testing();
index de6028760d55a90cd89c67c182575f783f8e3003..d29045210013421964c494a6651776e8a51c09b9 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 14;
+use Test::More;
 use Time::HiRes qw(usleep);
 
 # Extract the file name of a $format from the contents of
@@ -136,3 +136,5 @@ check_log_pattern('csvlog',  $new_current_logfiles, 'syntax error', $node);
 check_log_pattern('jsonlog', $new_current_logfiles, 'syntax error', $node);
 
 $node->stop();
+
+done_testing();
index d53bef9aa743f797d5ee888251e0f01e8570412e..48faeb43714eb900ae7f22861d5e04566c3348d5 100644 (file)
@@ -7,7 +7,7 @@ use warnings;
 use Config;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 82;
+use Test::More;
 
 my $tempdir       = PostgreSQL::Test::Utils::tempdir;
 
@@ -188,3 +188,5 @@ command_fails_like(
        qr/\Qpg_dumpall: error: option --exclude-database cannot be used together with -g\/--globals-only\E/,
        'pg_dumpall: option --exclude-database cannot be used together with -g/--globals-only'
 );
+
+done_testing();
index 39fa1952e70ca463899e55bf1c7852bff563d4ba..dd065c758fa9b54c6c77df5f5b688aa6c35c3d51 100644 (file)
@@ -3714,82 +3714,6 @@ my $supports_lz4 = check_pg_config("#define HAVE_LIBLZ4 1");
 $node->psql('postgres', 'create database regress_pg_dump_test;');
 $node->psql('postgres', 'create database regress_public_owner;');
 
-# Start with number of command_fails_like()*2 tests below (each
-# command_fails_like is actually 2 tests)
-my $num_tests = 12;
-
-foreach my $run (sort keys %pgdump_runs)
-{
-       my $test_key = $run;
-       my $run_db   = 'postgres';
-
-       if (defined($pgdump_runs{$run}->{database}))
-       {
-               $run_db = $pgdump_runs{$run}->{database};
-       }
-
-       # Each run of pg_dump is a test itself
-       $num_tests++;
-
-       # If there is a restore cmd, that's another test
-       if ($pgdump_runs{$run}->{restore_cmd})
-       {
-               $num_tests++;
-       }
-
-       if ($pgdump_runs{$run}->{test_key})
-       {
-               $test_key = $pgdump_runs{$run}->{test_key};
-       }
-
-       # Then count all the tests run against each run
-       foreach my $test (sort keys %tests)
-       {
-
-               # postgres is the default database, if it isn't overridden
-               my $test_db = 'postgres';
-
-               # Specific tests can override the database to use
-               if (defined($tests{$test}->{database}))
-               {
-                       $test_db = $tests{$test}->{database};
-               }
-
-               # The database to test against needs to match the database the run is
-               # for, so skip combinations where they don't match up.
-               if ($run_db ne $test_db)
-               {
-                       next;
-               }
-
-               # Skip any collation-related commands if there is no collation support
-               if (!$collation_support && defined($tests{$test}->{collation}))
-               {
-                       next;
-               }
-
-               # Skip tests specific to LZ4 if this build does not support
-               # this option.
-               if (!$supports_lz4 && defined($tests{$test}->{lz4}))
-               {
-                       next;
-               }
-
-               # If there is a like entry, but no unlike entry, then we will test the like case
-               if ($tests{$test}->{like}->{$test_key}
-                       && !defined($tests{$test}->{unlike}->{$test_key}))
-               {
-                       $num_tests++;
-               }
-               else
-               {
-                       # We will test everything that isn't a 'like'
-                       $num_tests++;
-               }
-       }
-}
-plan tests => $num_tests;
-
 #########################################
 # Set up schemas, tables, etc, to be dumped.
 
@@ -3975,3 +3899,5 @@ foreach my $run (sort keys %pgdump_runs)
 # Stop the database instance, which will be removed at the end of the tests.
 
 $node->stop('fast');
+
+done_testing();
index 43c9a9fbf897233ecfa35cea89f9e835c4294344..528db179cbd8535f74b4fcf7f23282477cb38391 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 3;
+use Test::More;
 
 my $tempdir       = PostgreSQL::Test::Utils::tempdir;
 
@@ -36,3 +36,5 @@ command_fails_like(
 command_ok(
        [ "pg_dump", '-p', $port, '-a', '--include-foreign-data=s2', 'postgres' ],
        "dump foreign server with no tables");
+
+done_testing();
index 2f7919a4b3142bf3d80784ebb301730571382a08..7a745ade0fbc14edc1838fc38c85bb6bd4dd06c3 100644 (file)
@@ -12,10 +12,6 @@ if ($PostgreSQL::Test::Utils::is_msys2)
 {
        plan skip_all => 'High bit name tests fail on Msys2';
 }
-else
-{
-       plan tests => 14;
-}
 
 # We're going to use byte sequences that aren't valid UTF-8 strings.  Use
 # LATIN1, which accepts any byte and has a conversion from each byte to UTF-8.
@@ -229,3 +225,5 @@ $cmdline_node->run_log(
 ok($result,
        'restore full dump with command-line options for connection parameters');
 is($stderr, '', 'no dump errors');
+
+done_testing();
index f9a5e02db2fd590e505bb1264dc33432f625b3cb..b4b192c86ccc961d320314abd31989e437735752 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 12;
+use Test::More;
 
 program_help_ok('pg_resetwal');
 program_version_ok('pg_resetwal');
@@ -28,3 +28,5 @@ SKIP:
        ok(check_mode_recursive($node->data_dir, 0700, 0600),
                'check PGDATA permissions');
 }
+
+done_testing();
index 52678428b54ffffa95ef4b292bdfe7b4804fc5c4..cb4f451d2506bf64b934a261f324b610d7d4513e 100644 (file)
@@ -8,7 +8,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 6;
+use Test::More;
 
 my $node = PostgreSQL::Test::Cluster->new('main');
 $node->init;
@@ -54,3 +54,5 @@ command_checks_all(
                qr/\Qpg_resetwal: warning: pg_control specifies invalid WAL segment size (0 bytes); proceed with caution\E/
        ],
        'processes zero WAL segment size');
+
+done_testing();
index a20ebda34557263e2973732e6f3149912b28b84a..db9201f38e899a2541477f50db2191ea4f68da9c 100644 (file)
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 23;
+use Test::More;
 
 use FindBin;
 use lib $FindBin::RealBin;
@@ -191,4 +191,4 @@ run_test('local');
 run_test('remote');
 run_test('archive');
 
-exit(0);
+done_testing();
index 5fac050e4b16c87aeb8f0ef8306766dcf6ccb422..8d6c0c0b280f032f61f558a519692101b23fd257 100644 (file)
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 7;
+use Test::More;
 
 use FindBin;
 use lib $FindBin::RealBin;
@@ -74,4 +74,4 @@ template1
 run_test('local');
 run_test('remote');
 
-exit(0);
+done_testing();
index 0d140342f23ca9a9148d7248cc7e9996132e5016..b1c47ea451481b06321a20c361ede9d2579a7433 100644 (file)
@@ -6,7 +6,7 @@
 use strict;
 use warnings;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 5;
+use Test::More;
 
 use File::Find;
 
@@ -103,4 +103,4 @@ sub run_test
 run_test('local');
 run_test('remote');
 
-exit(0);
+done_testing();
index 9754fa7665f66ca50a30d65576e4bee01d6950d2..805935c6fd5111672ca699e159d2bf09a0b20de0 100644 (file)
@@ -9,7 +9,7 @@ use warnings;
 use File::Copy;
 use File::Path qw(rmtree);
 use PostgreSQL::Test::Utils;
-use Test::More tests => 5;
+use Test::More;
 
 use FindBin;
 use lib $FindBin::RealBin;
@@ -76,4 +76,4 @@ in standby, after promotion
 run_test('local');
 run_test('remote');
 
-exit(0);
+done_testing();
index 2249694d9a6441b7e066b886a150e0737bee8b7d..ffb62f9b05a31523601a29f74e44f26405445967 100644 (file)
@@ -8,7 +8,7 @@
 use strict;
 use warnings;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 1;
+use Test::More;
 
 use FindBin;
 use lib $FindBin::RealBin;
@@ -20,4 +20,5 @@ RewindTest::start_primary();
 RewindTest::create_standby();
 RewindTest::run_pg_rewind('local');
 RewindTest::clean_rewind_test();
-exit(0);
+
+done_testing();
index b5f502350f765c43d0d558a714c90ef3377fdd63..c3c27e9894cc28a99a7ff0f70f970d24089e514c 100644 (file)
@@ -7,7 +7,7 @@
 use strict;
 use warnings;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 12;
+use Test::More;
 
 program_help_ok('pg_rewind');
 program_version_ok('pg_rewind');
@@ -41,3 +41,5 @@ command_fails(
                '--write-recovery-conf'
        ],
        'no local source with --write-recovery-conf');
+
+done_testing();
index df2e72912b45cbfd2c43e5ce0bea6d0277f981f4..47320ea5a6738aa0110f8b25ead5c3b0137f9bf4 100644 (file)
@@ -27,7 +27,7 @@
 use strict;
 use warnings;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 3;
+use Test::More;
 
 use FindBin;
 use lib $FindBin::RealBin;
@@ -176,4 +176,4 @@ $node_a->teardown_node;
 $node_b->teardown_node;
 $node_c->teardown_node;
 
-exit(0);
+done_testing();
index 8240229230d64d47a086a762d57747929154c566..e6a7177fb7d7b86d076941a41fd1f890817b1d66 100644 (file)
@@ -34,7 +34,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 3;
+use Test::More;
 
 use File::Copy;
 
@@ -173,3 +173,5 @@ and this too), 'table foo after rewind');
 
 $result = $node_2->safe_psql('postgres', 'SELECT * FROM public.bar');
 is($result, qq(in both), 'table bar after rewind');
+
+done_testing();
index ecfe89a9f206fa73e8f685574f6cb0dc256b9186..0b579dde9d6d3ede38ac48a16f6f9cc9acc4427c 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use Config;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 12;
+use Test::More;
 
 #########################################
 # Basic checks
@@ -26,3 +26,5 @@ command_fails_like(
        [ 'pg_test_fsync', '--secs-per-test', '0' ],
        qr/\Qpg_test_fsync: error: --secs-per-test must be in range 1..4294967295\E/,
        'pg_test_fsync: --secs-per-test must be in range');
+
+done_testing();
index e2c43070757476e114dacb5a7dbc5c67f27fab62..ef9f6d674694d942ebec7786fecf99a4fdd2916d 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use Config;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 12;
+use Test::More;
 
 #########################################
 # Basic checks
@@ -26,3 +26,5 @@ command_fails_like(
        [ 'pg_test_timing', '--duration', '0' ],
        qr/\Qpg_test_timing: --duration must be in range 1..4294967295\E/,
        'pg_test_timing: --duration must be in range');
+
+done_testing();
index 452f753ab32d1652e0236f9ef3c22cce534964ca..16febf9764c4b945a00dcb4af22e97f87bc6a826 100644 (file)
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 16;
+use Test::More;
 
 my $tempdir = PostgreSQL::Test::Utils::tempdir;
 
@@ -34,3 +34,5 @@ command_fails_like(
        [ 'pg_verifybackup', '-m', "$tempdir/not_the_manifest", $tempdir ],
        qr/could not open file.*\/not_the_manifest\"/,
        'pg_verifybackup respects -m flag');
+
+done_testing();
index 5d9965ba8f4ad7facc0b0a95e75114d17b85c77f..20e3ca587a53f608a4bd6a1b5654e336da4c06e2 100644 (file)
@@ -10,7 +10,7 @@ use Config;
 use File::Path qw(rmtree);
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 19;
+use Test::More;
 
 my $primary = PostgreSQL::Test::Cluster->new('primary');
 $primary->init(allows_streaming => 1);
@@ -59,3 +59,5 @@ for my $algorithm (qw(bogus none crc32c sha224 sha256 sha384 sha512))
        # Remove backup immediately to save disk space.
        rmtree($backup_path);
 }
+
+done_testing();
index 53be2efd87d328871357c1f70a9b28b056917d78..f402d301ac7db7315ea09cb404a9f90aa28464c2 100644 (file)
@@ -10,7 +10,7 @@ use Config;
 use File::Path qw(rmtree);
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 44;
+use Test::More;
 
 my $primary = PostgreSQL::Test::Cluster->new('primary');
 $primary->init(allows_streaming => 1);
@@ -290,3 +290,5 @@ sub cleanup_search_directory_fails
        chmod(0700, $pathname) || die "chmod $pathname: $!";
        return;
 }
+
+done_testing();
index 5a8fd9b0ecbda5342721abae931ef36d80a52351..7461dee03fc82aa153526c97c40f1769d4ec22a6 100644 (file)
@@ -10,7 +10,7 @@ use Config;
 use File::Path qw(rmtree);
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 25;
+use Test::More;
 
 # Start up the server and take a backup.
 my $primary = PostgreSQL::Test::Cluster->new('primary');
@@ -105,3 +105,5 @@ command_fails_like(
        ],
        qr/could not open directory/,
        'nonexistent backup directory');
+
+done_testing();
index ced516877d87e396ca1da67e04cc2012fa1b9275..118beb53d77c1bc28622e85a22c1e89d806dfdc0 100644 (file)
@@ -10,7 +10,7 @@ use Cwd;
 use Config;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 58;
+use Test::More;
 
 my $tempdir = PostgreSQL::Test::Utils::tempdir;
 
@@ -209,3 +209,5 @@ sub test_bad_manifest
        command_fails_like([ 'pg_verifybackup', $tempdir ], $regexp, $test_name);
        return;
 }
+
+done_testing();
index b869cd8fe6e52a92a5b7bebc97c10a31d497f1a2..ce45c919a8c0f28ac88c3e4b05593861d9d6ccf3 100644 (file)
@@ -9,7 +9,7 @@ use Cwd;
 use Config;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 5;
+use Test::More;
 
 my $primary = PostgreSQL::Test::Cluster->new('primary');
 $primary->init(allows_streaming => 1);
@@ -32,3 +32,5 @@ command_like(
        [ 'pg_verifybackup', '-s', $backup_path ],
        qr/backup successfully verified/,
        'backup with forced encoding verified');
+
+done_testing();
index 4723047d73d6a8c3e9e57a8a0102ac53b3ba50d6..56fcd84bec71be050e74d5e3079dcdd2a745d3fe 100644 (file)
@@ -10,7 +10,7 @@ use Config;
 use File::Path qw(rmtree);
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 9;
+use Test::More;
 
 # Start up the server and take a backup.
 my $primary = PostgreSQL::Test::Cluster->new('primary');
@@ -76,3 +76,5 @@ $primary->command_ok([ 'pg_basebackup', '-D', $backup_path2, '--no-sync', '-cfas
 command_ok(
        [ 'pg_verifybackup', $backup_path2 ],
        'valid base backup with timeline > 1');
+
+done_testing();
index 9d5b0e139a2dd2da29ded933a5c95800d0ae22ab..03f98966bddd3280b1991aa4324e51d87fd780b6 100644 (file)
@@ -11,7 +11,7 @@ use Config;
 use File::Path qw(rmtree);
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 9;
+use Test::More;
 
 my $primary = PostgreSQL::Test::Cluster->new('primary');
 $primary->init(allows_streaming => 1);
@@ -110,3 +110,5 @@ for my $tc (@test_configuration)
                rmtree($extract_path);
        }
 }
+
+done_testing();
index 9f9a7cc6a5fac5d38fc59754f2c0321382d1cb2c..c51cdf79f8c8a900ee1d87fb0891d3b95cd98b6a 100644 (file)
@@ -11,8 +11,7 @@ use Config;
 use File::Path qw(rmtree);
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 6;
-
+use Test::More;
 my $primary = PostgreSQL::Test::Cluster->new('primary');
 $primary->init(allows_streaming => 1);
 $primary->start;
@@ -64,3 +63,5 @@ for my $tc (@test_configuration)
        # Remove backup immediately to save disk space.
        rmtree($backup_path);
 }
+
+done_testing();
index 34c9b90669dc7651cd62991745812ef89b7ca4ea..159a4f86df01b7a72c5dbd0623defc4a2a6affff 100644 (file)
@@ -10,7 +10,7 @@ use Config;
 use File::Path qw(rmtree);
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 9;
+use Test::More;
 
 my $primary = PostgreSQL::Test::Cluster->new('primary');
 $primary->init(allows_streaming => 1);
@@ -109,3 +109,5 @@ for my $tc (@test_configuration)
                rmtree($backup_path);
        }
 }
+
+done_testing();
index 987d3eb6142a5854e98329d274046927faa14dcd..883adff8fa131859cf4615a275d5cd2262fb8e62 100644 (file)
@@ -4,8 +4,10 @@
 use strict;
 use warnings;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 8;
+use Test::More;
 
 program_help_ok('pg_waldump');
 program_version_ok('pg_waldump');
 program_options_handling_ok('pg_waldump');
+
+done_testing();
index 9e14dc71ffb77b48cdb66b6cc1a9fe5dce374b88..ba3dd846bad81165c9ac74e7f691e1d6f10c2cca 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 25;
+use Test::More;
 
 program_help_ok('psql');
 program_version_ok('psql');
@@ -80,3 +80,5 @@ psql_like(
        'handling of unexpected PQresultStatus',
        'START_REPLICATION 0/0',
        undef, qr/unexpected PQresultStatus: 8$/);
+
+done_testing();
index f445fce67afe077dc8b15c3bd335d45d669315de..3224f8e26af523a0d6d5a15d51182266c7ca0048 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 2;
+use Test::More;
 use Time::HiRes qw(usleep);
 
 my $tempdir = PostgreSQL::Test::Utils::tempdir;
@@ -64,3 +64,5 @@ SKIP: {
        ok(!$result, 'query failed as expected');
        like($stderr, qr/canceling statement due to user request/, 'query was canceled');
 }
+
+done_testing();
index 0878d9fcbb1aa28b5b6bf65313a04963c62e0e3d..3d9abbbcc394f5bbc9142e0c6f5047f36926cf1c 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 14;
+use Test::More;
 
 program_help_ok('clusterdb');
 program_version_ok('clusterdb');
@@ -34,3 +34,5 @@ $node->issues_sql_like(
 
 $node->command_ok([qw(clusterdb --echo --verbose dbname=template1)],
        'clusterdb with connection string');
+
+done_testing();
index 81e03a20d03f6bbf6fe32254f6c6ddf1dbb049c3..7818988976cbb0c31f556b24226963a4dd0058af 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 2;
+use Test::More;
 
 my $node = PostgreSQL::Test::Cluster->new('main');
 $node->init;
@@ -20,3 +20,5 @@ $node->issues_sql_like(
        [ 'clusterdb', '-a' ],
        qr/statement: CLUSTER.*statement: CLUSTER/s,
        'cluster all databases');
+
+done_testing();
index c54c291b7ad7e3e375f600e992dc1553d879ef14..639245466e8f42ae09a74e670daed16194db43aa 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 25;
+use Test::More;
 
 program_help_ok('createdb');
 program_version_ok('createdb');
@@ -75,3 +75,5 @@ $node->command_checks_all(
                qr/^createdb: error: database creation failed: ERROR:  invalid locale name|^createdb: error: database creation failed: ERROR:  new LC_CTYPE \(foo'; SELECT '1\) is incompatible with the LC_CTYPE of the template database/s
        ],
        'createdb with incorrect --lc-ctype');
+
+done_testing();
index e31e5b0c62355ff927430a2f2b5693d03c754aa8..2a34be81cf65cc4c7315959afe719425671e3d72 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 17;
+use Test::More;
 
 program_help_ok('createuser');
 program_version_ok('createuser');
@@ -35,3 +35,5 @@ $node->issues_sql_like(
 
 $node->command_fails([ 'createuser', 'regress_user1' ],
        'fails if role already exists');
+
+done_testing();
index 1e08cbbf7f928669ec59f1278c16350b57db3761..4e946667d5e193ba5a5717940db3a767bb8b792a 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 13;
+use Test::More;
 
 program_help_ok('dropdb');
 program_version_ok('dropdb');
@@ -30,3 +30,5 @@ $node->issues_sql_like(
 
 $node->command_fails([ 'dropdb', 'nonexistent' ],
        'fails with nonexistent database');
+
+done_testing();
index c4fb6329bae0645211b3efd07eddb357900d3621..e4eac2186de26418403c0c1bdc9a7180ba432289 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 11;
+use Test::More;
 
 program_help_ok('dropuser');
 program_version_ok('dropuser');
@@ -24,3 +24,5 @@ $node->issues_sql_like(
 
 $node->command_fails([ 'dropuser', 'regress_nonexistent' ],
        'fails with nonexistent user');
+
+done_testing();
index 951c0e069c423c6d0b1989cebf69ad625c5608cb..e8436dc7e8a2cffa2c0d6180b000e3b65feefc1d 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 10;
+use Test::More;
 
 program_help_ok('pg_isready');
 program_version_ok('pg_isready');
@@ -21,3 +21,5 @@ $node->start;
 # use a long timeout for the benefit of very slow buildfarm machines
 $node->command_ok([qw(pg_isready --timeout=60)],
        'succeeds with server running');
+
+done_testing();
index 1306fb12341dcd10b37f10585b5a7749cadb30c2..70cd7606dd969a4a7b5ddf860e27431c523be849 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 58;
+use Test::More;
 
 program_help_ok('reindexdb');
 program_version_ok('reindexdb');
@@ -199,3 +199,5 @@ $node->command_checks_all(
                qr/^reindexdb: warning: cannot reindex system catalogs concurrently, skipping all/s
        ],
        'parallel reindexdb for system with --concurrently skips catalogs');
+
+done_testing();
index 47e8341de3f71a568212f50a825d12d8b62a3d01..378bf9060e92114b091cf7f39c5ecb792c90287d 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 
 use PostgreSQL::Test::Cluster;
-use Test::More tests => 2;
+use Test::More;
 
 my $node = PostgreSQL::Test::Cluster->new('main');
 $node->init;
@@ -17,3 +17,5 @@ $node->issues_sql_like(
        [ 'reindexdb', '-a' ],
        qr/statement: REINDEX.*statement: REINDEX/s,
        'reindex all databases');
+
+done_testing();
index ee3bfdb6d05239860fc54604d6cfffcb69b1231d..96a818a3c16b5096b2253daeb1428bba1cd6a1e9 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 58;
+use Test::More;
 
 program_help_ok('vacuumdb');
 program_version_ok('vacuumdb');
@@ -146,3 +146,5 @@ $node->issues_sql_like(
        [ 'vacuumdb', '--min-xid-age', '2147483001', 'postgres' ],
        qr/GREATEST.*relfrozenxid.*2147483001/,
        'vacuumdb --table --min-xid-age');
+
+done_testing();
index 6e8962154caad37dec39551efb7a1bdf889d9c30..1dcf411767122133c77fc4f6b0359083bcabe9c8 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 
 use PostgreSQL::Test::Cluster;
-use Test::More tests => 2;
+use Test::More;
 
 my $node = PostgreSQL::Test::Cluster->new('main');
 $node->init;
@@ -15,3 +15,5 @@ $node->issues_sql_like(
        [ 'vacuumdb', '-a' ],
        qr/statement: VACUUM.*statement: VACUUM/s,
        'vacuum all databases');
+
+done_testing();
index c94e9e1d642c4b7ab2f2d8653f9bf2f204240532..caff3a3a0dae9cd0988139adeabebb3b5894f0f1 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 
 use PostgreSQL::Test::Cluster;
-use Test::More tests => 4;
+use Test::More;
 
 my $node = PostgreSQL::Test::Cluster->new('main');
 $node->init;
@@ -36,3 +36,5 @@ $node->issues_sql_like(
                    .*statement:\ RESET\ default_statistics_target;
                    .*statement:\ ANALYZE/sx,
        'analyze more than one database in stages');
+
+done_testing();
index 6d75af1d6cb07578d981ef4e1253a7d7f4661cde..c865146a6f898062f27e635b0a4ab0e33eed7cd2 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 3;
+use Test::More;
 
 # Tests to check connection string handling in utilities
 
@@ -40,3 +40,5 @@ $node->command_ok([qw(reindexdb --all --echo)],
 $node->command_ok(
        [qw(clusterdb --all --echo --verbose)],
        'clusterdb --all with unusual database names');
+
+done_testing();
index 5d5645585712f5faab280bd70616d9c2cff1c218..3e3079c824a1cff90174931ba68ee0759d3c6215 100644 (file)
@@ -18,11 +18,6 @@ if (!$use_unix_sockets)
        plan skip_all =>
          "authentication tests cannot run without Unix-domain sockets";
 }
-else
-{
-       plan tests => 23;
-}
-
 
 # Delete pg_hba.conf from the given node, add a new entry to it
 # and then execute a reload to refresh it.
@@ -160,3 +155,5 @@ append_to_file(
 !);
 
 test_role($node, 'md5_role', 'password from pgpass', 0);
+
+done_testing();
index d8995b1ae5324d61c02afaf200efd21422c39b0b..5e87e21ee9bb1dc383b821a9050c92fdffb72020 100644 (file)
@@ -15,10 +15,6 @@ if (!$use_unix_sockets)
        plan skip_all =>
          "authentication tests cannot run without Unix-domain sockets";
 }
-else
-{
-       plan tests => 12;
-}
 
 # Delete pg_hba.conf from the given node, add a new entry to it
 # and then execute a reload to refresh it.
@@ -117,3 +113,5 @@ test_login($node, 'saslpreptest6_role', "foobar",     2);
 test_login($node, 'saslpreptest7_role', "foo\xd8\xa71bar", 0);
 test_login($node, 'saslpreptest7_role', "foo1\xd8\xa7bar", 2);
 test_login($node, 'saslpreptest7_role', "foobar",          2);
+
+done_testing();
index 2b539d2402132c1ed94577a859c19fafb864b1c6..62e0542639309e2a1ecb5091627450a3750469de 100644 (file)
@@ -21,11 +21,7 @@ use PostgreSQL::Test::Cluster;
 use Test::More;
 use Time::HiRes qw(usleep);
 
-if ($ENV{with_gssapi} eq 'yes')
-{
-       plan tests => 44;
-}
-else
+if ($ENV{with_gssapi} ne 'yes')
 {
        plan skip_all => 'GSSAPI/Kerberos not supported by this build';
 }
@@ -399,3 +395,5 @@ test_access(
        '',
        'fails with wrong krb_realm, but still authenticates',
        "connection authenticated: identity=\"test1\@$realm\" method=gss");
+
+done_testing();
index cdc4e1e5c800f52a1f2905c44b15ce8a75414807..094270cb5d43f34cc89e5a9b17eeb53a464574e1 100644 (file)
@@ -7,11 +7,7 @@ use PostgreSQL::Test::Utils;
 use PostgreSQL::Test::Cluster;
 use Test::More;
 
-if ($ENV{with_ldap} eq 'yes')
-{
-       plan tests => 28;
-}
-else
+if ($ENV{with_ldap} ne 'yes')
 {
        plan skip_all => 'LDAP not supported by this build';
 }
@@ -367,3 +363,5 @@ $node->restart;
 
 $ENV{"PGPASSWORD"} = 'secret1';
 test_access($node, 'test1', 2, 'bad combination of LDAPS and StartTLS');
+
+done_testing();
index 2c9a206ae5e6afdf4e753a618855e0fd711f5505..3108c02cf4df9eb968e266d84b3ce93de14fe97b 100644 (file)
@@ -7,7 +7,7 @@ use strict;
 use warnings;
 
 use PostgreSQL::Test::Utils;
-use Test::More tests => 2;
+use Test::More;
 use PostgreSQL::Test::Cluster;
 
 my $node = PostgreSQL::Test::Cluster->new('tango');
@@ -42,3 +42,5 @@ $count = $node->safe_psql('postgres',
 );
 is($count, 't', "index got summarized");
 $node->stop;
+
+done_testing();
index 52fca03ddb6d583c261f1472c2ba5a9b53bdb0e4..3f0bb9e858643f1d05e0a9bfdb2b3360b213608a 100644 (file)
@@ -7,7 +7,7 @@ use strict;
 use warnings;
 
 use PostgreSQL::Test::Utils;
-use Test::More tests => 2;
+use Test::More;
 use PostgreSQL::Test::Cluster;
 
 my $node = PostgreSQL::Test::Cluster->new('foxtrot');
@@ -34,3 +34,5 @@ my $recovered_ts = $node->safe_psql('postgres',
        'select ts.* from pg_class, pg_xact_commit_timestamp(xmin) ts where relname = \'t\''
 );
 is($recovered_ts, $ts, 'commit TS remains after crash recovery');
+
+done_testing();
index c8791f5b0e5d52c08b3a8d81df7931b5fcf7a066..ace31405e639f7b8d031378516ca8d3b22cc27d3 100644 (file)
@@ -7,7 +7,7 @@ use strict;
 use warnings;
 
 use PostgreSQL::Test::Utils;
-use Test::More tests => 4;
+use Test::More;
 use PostgreSQL::Test::Cluster;
 
 my $bkplabel = 'backup';
@@ -64,3 +64,5 @@ like(
        $standby_ts_stderr,
        qr/could not get commit timestamp data/,
        'expected error when primary turned feature off');
+
+done_testing();
index b53ca4f8de4c491df8b1046d19c87ed4b739fed7..16d5f13009c6935d7cae5b2088a7be3b1bfd8db2 100644 (file)
@@ -7,7 +7,7 @@ use strict;
 use warnings;
 
 use PostgreSQL::Test::Utils;
-use Test::More tests => 4;
+use Test::More;
 use PostgreSQL::Test::Cluster;
 
 my $bkplabel = 'backup';
@@ -65,3 +65,5 @@ my $standby_ts = $standby->safe_psql('postgres',
 );
 isnt($standby_ts, '',
        "standby gives valid value ($standby_ts) after promotion");
+
+done_testing();
index 40d1b1a945f39fc54c0a0036956a2353211e7bcd..808164c34da6de13ac5cffe599789ff43357fa64 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 16;
+use Test::More;
 
 my $node_primary = PostgreSQL::Test::Cluster->new('primary');
 $node_primary->init(allows_streaming => 1);
@@ -150,3 +150,5 @@ is($after_enable_disabled_ts, '',
        'timestamp of disabled tx null after re-enable');
 
 $node_primary->stop;
+
+done_testing();
index 7bd6022035a3a6771c6e8173364875e42a1ae64b..3b9fc66b8ee131300fd99d072041aa79022282e3 100644 (file)
@@ -7,7 +7,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 42;
+use Test::More;
 
 # Initialize a test cluster
 my $node = PostgreSQL::Test::Cluster->new('primary');
@@ -311,3 +311,5 @@ ok( $output =~
 run_sql_command('DROP TABLE quuux;');
 
 $node->stop('fast');
+
+done_testing();
index 4e4c35b4f23451e617e3bb54b2ed71dc16d734fb..6fea419bb8026fd1126498699e2de23cd158df37 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 20;
+use Test::More;
 
 my $node = PostgreSQL::Test::Cluster->new('main');
 $node->init;
@@ -97,3 +97,5 @@ $result = $node->psql('postgres', "DROP TABLESPACE regress_ts4");
 ok($result == 0, 'drop tablespace 4');
 
 $node->stop;
+
+done_testing();
index 72b2d316ccc492658126a4ee8640a09a71894235..6700399d8e4df167925a95931c3fce8f325da567 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 3;
+use Test::More;
 
 my $node = PostgreSQL::Test::Cluster->new('main');
 $node->init;
@@ -106,3 +106,5 @@ foreach my $param (@sample_intersect)
                "found GUC $param in postgresql.conf.sample, marked as NOT_IN_SAMPLE\n"
        );
 }
+
+done_testing();
index a906f8f03d6170e74f91cb14f8315c91ef81adbd..c73bd37835eebd0c93425b0df7220c5fae5004dc 100644 (file)
@@ -718,44 +718,6 @@ $node->start;
 
 my $port = $node->port;
 
-my $num_tests = 0;
-
-foreach my $run (sort keys %pgdump_runs)
-{
-       my $test_key = $run;
-
-       # Each run of pg_dump is a test itself
-       $num_tests++;
-
-       # If there is a restore cmd, that's another test
-       if ($pgdump_runs{$run}->{restore_cmd})
-       {
-               $num_tests++;
-       }
-
-       if ($pgdump_runs{$run}->{test_key})
-       {
-               $test_key = $pgdump_runs{$run}->{test_key};
-       }
-
-       # Then count all the tests run against each run
-       foreach my $test (sort keys %tests)
-       {
-               # If there is a like entry, but no unlike entry, then we will test the like case
-               if ($tests{$test}->{like}->{$test_key}
-                       && !defined($tests{$test}->{unlike}->{$test_key}))
-               {
-                       $num_tests++;
-               }
-               else
-               {
-                       # We will test everything that isn't a 'like'
-                       $num_tests++;
-               }
-       }
-}
-plan tests => $num_tests;
-
 #########################################
 # Set up schemas, tables, etc, to be dumped.
 
@@ -847,3 +809,5 @@ foreach my $run (sort keys %pgdump_runs)
 # Stop the database instance, which will be removed at the end of the tests.
 
 $node->stop('fast');
+
+done_testing();
index 9e870830cfc3658c86ed71316e7845feb982a5e8..0511c55e9aac0029607bf6506e0e95e29b47f1ce 100644 (file)
@@ -54,8 +54,7 @@ Each test script should begin with:
     use warnings;
     use PostgreSQL::Test::Cluster;
     use PostgreSQL::Test::Utils;
-    # Replace with the number of tests to execute:
-    use Test::More tests => 1;
+    use Test::More;
 
 then it will generally need to set up one or more nodes, run commands
 against them and evaluate the results. For example:
@@ -69,6 +68,10 @@ against them and evaluate the results. For example:
 
     $node->stop('fast');
 
+Each test script should end with:
+
+       done_testing();
+
 Test::More::like entails use of the qr// operator.  Avoid Perl 5.8.8 bug
 #39185 by not using the "$" regular expression metacharacter in qr// when also
 using the "/m" modifier.  Instead of "$", use "\n" or "(?=\n|\z)".
index ca760c7210794cc77549993a817e7d85949d3452..583ee87da829816536574454ecbc5a825214640d 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 55;
+use Test::More;
 
 # Initialize primary node
 my $node_primary = PostgreSQL::Test::Cluster->new('primary');
@@ -529,3 +529,5 @@ ok( ($phys_restart_lsn_pre cmp $phys_restart_lsn_post) == 0,
 my $primary_data = $node_primary->data_dir;
 ok(!-f "$primary_data/pg_wal/$segment_removed",
        "WAL segment $segment_removed recycled after physical slot advancing");
+
+done_testing();
index 9a0451b8e46880c1d186e1794c262397c21028e4..c8f5ffbaf02d8ca5af7bb3afbf529def3db72ae2 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 7;
+use Test::More;
 use File::Copy;
 
 # Initialize primary node, doing archives
@@ -120,3 +120,5 @@ like(
        $log_contents,
        qr/WARNING:.*recovery_end_command/s,
        "recovery_end_command failure detected in logs after promotion");
+
+done_testing();
index 24da78c0bcdebfe255d205f35e8e5f2303bacc03..25dd5ee7ec79b2a8d764a9f419bd433cda0c239b 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 9;
+use Test::More;
 use Time::HiRes qw(usleep);
 
 # Create and test a standby from given backup, with a certain recovery target.
@@ -182,3 +182,5 @@ $logfile = slurp_file($node_standby->logfile());
 ok( $logfile =~
          qr/FATAL: .* recovery ended before configured recovery target was reached/,
        'recovery end before target reached is a fatal error');
+
+done_testing();
index 05b79316681b15d1bb7fbff31668fd502b686280..3203d93701643ce12a699dd6b2a9b31b13e5b6e2 100644 (file)
@@ -7,7 +7,7 @@ use warnings;
 use File::Path qw(rmtree);
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 3;
+use Test::More;
 
 $ENV{PGDATABASE} = 'postgres';
 
@@ -106,3 +106,5 @@ $node_primary_2->wait_for_catchup($node_standby_3);
 my $result_2 =
   $node_standby_3->safe_psql('postgres', "SELECT count(*) FROM tab_int");
 is($result_2, qq(1), 'check content of standby 3');
+
+done_testing();
index 39c5675cc9fcfa1aa77e88722ccd8821b84f34d2..370fc9eace5fb6bfaac0a8000343bffd81fc0d80 100644 (file)
@@ -7,7 +7,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 3;
+use Test::More;
 
 # Initialize primary node
 my $node_primary = PostgreSQL::Test::Cluster->new('primary');
@@ -110,3 +110,5 @@ $node_standby2->poll_query_until('postgres',
 $node_standby2->promote;
 $node_standby2->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
   or die "Timed out while waiting for promotion to finish";
+
+done_testing();
index 29b68a7f8580f003df83d5f7e7228a3cae698bee..fa6bd453324c60decc2ad1d21ea666e1696ac97e 100644 (file)
@@ -10,7 +10,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 15;
+use Test::More;
 use Config;
 
 # Initialize primary node
@@ -200,3 +200,5 @@ ok(($logical_restart_lsn_pre cmp $logical_restart_lsn_post) == 0,
 
 # done with the node
 $node_primary->stop;
+
+done_testing();
index cebd59011131c3c8b6d9173c774652bb148a2ef1..86f89c63e2278f2a0efc41ab71a588b13b5f6616 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 11;
+use Test::More;
 
 # Query checking sync_priority and sync_state of each standby
 my $check_sql =
@@ -217,3 +217,5 @@ standby3|1|quorum
 standby4|1|quorum),
        'all standbys are considered as candidates for quorum sync standbys',
        'ANY 2(*)');
+
+done_testing();
index ee48c217cfe1ea26966a7fafa7f4d1a5c71d3d24..5be2153c336417a778fe63b69641a5c0d1e15b1e 100644 (file)
@@ -10,7 +10,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 1;
+use Test::More;
 
 my $node_primary = PostgreSQL::Test::Cluster->new('primary');
 $node_primary->init(allows_streaming => 1);
@@ -96,3 +96,5 @@ is( $node_standby->psql(
                qq{insert into testtab select generate_series(1,1000), 'foo';}),
        0,
        'INSERT succeeds with truncated relation FSM');
+
+done_testing();
index 2d0b3b0873132e9489bae8a243a7929d3fb4caee..3e25b8c4ebdd3d3b533fc8fcf8590f02525645b7 100644 (file)
@@ -7,7 +7,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 24;
+use Test::More;
 
 my $psql_out = '';
 my $psql_rc  = '';
@@ -480,3 +480,5 @@ $cur_standby->psql(
 is( $psql_out,
        qq{27|issued to paris},
        "Check expected t_009_tbl2 data on standby");
+
+done_testing();
index 672cd74f3b974d5983a7f4919e4d8ad081a82ff6..6e8b0b1b968fd6db44275539a0d1392663c19cd4 100644 (file)
@@ -26,7 +26,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 13;
+use Test::More;
 use File::Copy;
 use IPC::Run ();
 use Scalar::Util qw(blessed);
@@ -196,3 +196,5 @@ is($stdout, $final_expected_output_bb,
        'got same output from walsender via pg_recvlogical on before_basebackup');
 
 $node_replica->teardown_node();
+
+done_testing();
index 3892aba3e52a7af98e41607a0a50b8ba29f07259..14154d1ce0f61ae37d1fe680218df7f5a9678e3f 100644 (file)
@@ -11,8 +11,6 @@ use PostgreSQL::Test::Utils;
 use Test::More;
 use Config;
 
-plan tests => 3;
-
 my $node = PostgreSQL::Test::Cluster->new('primary');
 $node->init(allows_streaming => 1);
 $node->start;
@@ -62,3 +60,5 @@ is($node->safe_psql('postgres', qq[SELECT pg_xact_status('$xid');]),
 
 $stdin .= "\\q\n";
 $tx->finish;    # wait for psql to quit gracefully
+
+done_testing();
index 2a558b23017f53f4572f28eca4026afae6175544..f8075097a9627a25c7fc54af1017ff04c5bee7db 100644 (file)
@@ -7,7 +7,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 12;
+use Test::More;
 
 # Setup primary node
 my $node_primary = PostgreSQL::Test::Cluster->new("primary");
@@ -214,3 +214,5 @@ $node_primary->psql(
        "SELECT coalesce(sum(id),-1) FROM t_012_tbl",
        stdout => \$psql_out);
 is($psql_out, '-1', "Not visible");
+
+done_testing();
index 44c6ac8a00763761b05d22d388d5799f780334fe..3b740eb6f39d5a07849c4c94de6f91afe39df316 100644 (file)
@@ -18,9 +18,6 @@ use PostgreSQL::Test::Utils;
 use Test::More;
 use Config;
 
-plan tests => 18;
-
-
 # To avoid hanging while expecting some specific input from a psql
 # instance being driven by us, add a timeout high enough that it
 # should never trigger even on very slow machines, unless something
@@ -272,3 +269,5 @@ sub pump_until
        return 1;
 
 }
+
+done_testing();
index c1bb89176bafddb1f024e8f793d471ef1b729859..da77c1211ff2a61672747d0bf83ade67ae992c71 100644 (file)
@@ -10,7 +10,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 12;
+use Test::More;
 
 my $node = PostgreSQL::Test::Cluster->new('main');
 
@@ -82,3 +82,5 @@ ok( !-f "$pgdata/${ts1UnloggedPath}_vm",
        'vm fork in tablespace removed at startup');
 ok( !-f "$pgdata/${ts1UnloggedPath}_fsm",
        'fsm fork in tablespace removed at startup');
+
+done_testing();
index 65443df5feb4cbdeb9cc837dbefe6081b6cf050f..8d57b1b3d6bd83c70a1f3281eb5925a756a49373 100644 (file)
@@ -9,7 +9,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 1;
+use Test::More;
 
 # Initialize primary node
 my $alpha = PostgreSQL::Test::Cluster->new('alpha');
@@ -85,3 +85,5 @@ $bravo->start;
 my $psql_out;
 $bravo->psql('postgres', "SELECT count(*) FROM test1", stdout => \$psql_out);
 is($psql_out, '1000', "Check that table state is correct");
+
+done_testing();
index 86fd6f55468d035001047189d9eddc115d76bd6a..5e0655c2a9c97c17d187300694e6414a2bf81410 100644 (file)
@@ -11,7 +11,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 1;
+use Test::More;
 
 # Find the largest LSN in the set of pages part of the given relation
 # file.  This is used for offline checks of page consistency.  The LSN
@@ -139,3 +139,5 @@ die "No minRecoveryPoint in control file found\n"
 # the pages on disk.
 ok($offline_recovery_lsn ge $offline_max_lsn,
        "Check offline that table data is consistent with minRecoveryPoint");
+
+done_testing();
index d57679b531f81a85abaa086d40eb4c0c733fe384..678a252165e24a246249e54d2c3a4b7b6e938778 100644 (file)
@@ -25,10 +25,6 @@ if ($@ || $windows_os)
 {
        plan skip_all => 'SysV shared memory not supported by this platform';
 }
-else
-{
-       plan tests => 4;
-}
 
 my $tempdir = PostgreSQL::Test::Utils::tempdir;
 
@@ -218,3 +214,5 @@ sub poll_start
        $node->start && return 1;
        return 0;
 }
+
+done_testing();
index 2bc7b9aa3d1c44b48a3fc1723c6b4c3e235d9d03..1410e2f03b90b7bf81dfff933f5140bb97dc28d4 100644 (file)
@@ -14,7 +14,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 38;
+use Test::More;
 
 sub check_orphan_relfilenodes
 {
@@ -399,3 +399,5 @@ wal_skip_threshold = 0
 # Run same test suite for multiple wal_level values.
 run_wal_optimize("minimal");
 run_wal_optimize("replica");
+
+done_testing();
index 76b6ba1987c7473ab1baa7253984eaa541cfb94d..4257bd4d35a821f02508f83d04af709f2d6615b0 100644 (file)
@@ -11,7 +11,7 @@ use PostgreSQL::Test::Utils;
 use PostgreSQL::Test::Cluster;
 
 use File::Path qw(rmtree);
-use Test::More tests => $PostgreSQL::Test::Utils::windows_os ? 16 : 20;
+use Test::More;
 use Time::HiRes qw(usleep);
 
 $ENV{PGDATABASE} = 'postgres';
@@ -421,3 +421,5 @@ sub find_in_log
 
        return $log =~ m/$pat/;
 }
+
+done_testing();
index 06c2b69ef40cf7d7122014d5fb25024a79e1c890..cbff26e122a284e0b4c275980fc0ab5b1b37e31a 100644 (file)
@@ -8,7 +8,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 16;
+use Test::More;
 use Config;
 
 my $primary = PostgreSQL::Test::Cluster->new('primary');
@@ -234,3 +234,5 @@ ok( -f "$standby2_data/$segment_path_1_done"
          && -f "$standby2_data/$segment_path_2_done",
        ".done files created after archive success with archive_mode=always on standby"
 );
+
+done_testing();
index 1ceb03275075560b7ecf3ddda210d63268b68228..e2743518de381099ecdcb6c3d38b1559e4d993ed 100644 (file)
@@ -8,7 +8,7 @@ use warnings;
 
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 10;
+use Test::More;
 use Config;
 
 # Initialize primary node
@@ -208,3 +208,5 @@ sub send_query_and_wait
 
        return 1;
 }
+
+done_testing();
index 2000f51731043cb6ca769243f2db917eacb6a512..6ab30928742c989fcc4b358ce52bec344e706e3c 100644 (file)
@@ -14,11 +14,6 @@ if ($Config{osname} eq 'MSWin32')
        plan skip_all => 'tests hang on Windows';
        exit;
 }
-else
-{
-       plan tests => 9;
-}
-
 
 # To avoid hanging while expecting some specific input from a psql
 # instance being driven by us, add a timeout high enough that it
@@ -275,3 +270,5 @@ sub pump_until
        }
        return 1;
 }
+
+done_testing();
index da13e1d0f32a2be2f7ba254ae7bd2c8943d2b4ce..39e8a8fa176c5989960c358015d0e2ce28d2e2f4 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 1;
+use Test::More;
 use File::Compare;
 
 # Initialize and start primary node with WAL archiving
@@ -87,3 +87,5 @@ CHECKPOINT;
 # still be found.
 $node_pitr->stop('immediate');
 $node_pitr->start;
+
+done_testing();
index dccdbd58790e4a48f4ea9482dcbcbd7e5f26ae5c..c10bb5bf70f042796511d3025f48a6b54a459b7c 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 2;
+use Test::More;
 use Time::HiRes qw(usleep);
 
 # Initialize and start node with wal_level = replica and WAL archiving
@@ -101,3 +101,5 @@ test_recovery_wal_level_minimal('archive_recovery', 'archive recovery', 0);
 
 # Test for standby server
 test_recovery_wal_level_minimal('standby', 'standby', 1);
+
+done_testing();
index dc48f909c4dda44b9b5ae36b819a64f68084e09d..d113c8cc9c5a7a8e692f733a82af2a2d4407d4b0 100644 (file)
@@ -13,7 +13,7 @@ use PostgreSQL::Test::Utils;
 
 use File::Basename;
 use FindBin;
-use Test::More tests => 1;
+use Test::More;
 
 # Initialize primary node
 my $node_primary = PostgreSQL::Test::Cluster->new('primary');
@@ -108,3 +108,5 @@ my $result =
   $node_cascade->safe_psql('postgres', "SELECT count(*) FROM tab_int");
 print "cascade: $result\n";
 is($result, 1, 'check streamed content on cascade standby');
+
+done_testing();
index e9aadad1b2120e80d9adadc6204387d0c0d22d85..0fd907f152608592c39e331b4b4ec8f127fbef6a 100644 (file)
@@ -10,8 +10,6 @@ use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
 use Test::More;
 
-plan tests => 3;
-
 # Test: Create a physical replica that's missing the last WAL file,
 # then restart the primary to create a divergent WAL file and observe
 # that the replica replays the "overwrite contrecord" from that new
@@ -104,3 +102,5 @@ like(
 
 $node->stop;
 $node_standby->stop;
+
+done_testing();
index 37449006c1c259568af6473a07585701a045e743..c0aae707ea1d8daefa0c9cf3e720a5f0e5611038 100644 (file)
@@ -12,10 +12,6 @@ if (PostgreSQL::Test::Utils::has_wal_read_bug)
        # this test file to die(), not merely to fail.
        plan skip_all => 'filesystem bug';
 }
-else
-{
-       plan tests => 4;
-}
 
 # Initialize primary node
 my $node_primary = PostgreSQL::Test::Cluster->new('primary');
@@ -91,3 +87,5 @@ command_ok(
 
 $node_standby_1->stop;
 $node_primary->stop;
+
+done_testing();
index 659ba9cb823a83a6830f451b74cb64a2e0a4c6c2..b8f8b65a8fc2ea3a43380c855531f249290fcac6 100644 (file)
@@ -19,10 +19,6 @@ if ($ENV{with_ssl} ne 'openssl')
 {
        plan skip_all => 'OpenSSL not supported by this build';
 }
-else
-{
-       plan tests => 110;
-}
 
 #### Some configuration
 
@@ -619,3 +615,5 @@ $node->connect_fails(
        "$common_connstr user=ssltestuser sslcert=ssl/client-revoked.crt sslkey=$key{'client-revoked.key'}",
        "certificate authorization fails with revoked client cert with server-side CRL directory",
        expected_stderr => qr/SSL error: sslv3 alert certificate revoked/);
+
+done_testing();
index d86e4b634199de6a09a622cf4cfeb24de6e10706..41d231c55d00143fce55472cbe97e7d33055a6de 100644 (file)
@@ -30,8 +30,6 @@ my $SERVERHOSTCIDR = '127.0.0.1/32';
 my $supports_tls_server_end_point =
   check_pg_config("#define HAVE_X509_GET_SIGNATURE_NID 1");
 
-my $number_of_tests = $supports_tls_server_end_point ? 11 : 12;
-
 # Allocation of base connection string shared among multiple tests.
 my $common_connstr;
 
@@ -118,4 +116,4 @@ $node->connect_ok(
                qr/connection authenticated: identity="ssltestuser" method=scram-sha-256/
        ]);
 
-done_testing($number_of_tests);
+done_testing();
index dec0fab1611f07c99112cd877de3a2bcf384046a..f008ea659411da15f6839b10a2dd657b584913f8 100644 (file)
@@ -18,10 +18,6 @@ if ($ENV{with_ssl} ne 'openssl')
 {
        plan skip_all => 'OpenSSL not supported by this build';
 }
-else
-{
-       plan tests => 13;
-}
 
 #### Some configuration
 
@@ -135,3 +131,5 @@ $result = $node->safe_psql("certdb",
   "SELECT value, critical FROM ssl_extension_info() WHERE name = 'basicConstraints';",
   connstr => $common_connstr);
 is($result, 'CA:FALSE|t', 'extract extension from cert');
+
+done_testing();
index b7953c093136f240205b7607cefd4ffa2286ef63..af0cff6a30f886cb65fb95ead1be16017d5f3515 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 32;
+use Test::More;
 
 # Initialize publisher node
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
@@ -537,3 +537,5 @@ ROLLBACK;
 ok( $reterr =~
          m/WARNING:  wal_level is insufficient to publish logical changes/,
        'CREATE PUBLICATION while wal_level=minimal');
+
+done_testing();
index 3f0792ed84b0398131982eb6d258b23af8ddb639..3f1f00f7c8d9d338d86406c156fccaba355eadf0 100644 (file)
@@ -7,7 +7,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 4;
+use Test::More;
 
 # Initialize publisher node
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
@@ -566,3 +566,5 @@ is($result, '21', 'sql-function constraint on domain');
 
 $node_subscriber->stop('fast');
 $node_publisher->stop('fast');
+
+done_testing();
index 6f3ebd6781357019a11a2e5dd8e1d702cc16e61f..63c22699c05d66739b1f7ff9c6d0b46dc642b2e2 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 6;
+use Test::More;
 
 # Initialize publisher node
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
@@ -137,3 +137,5 @@ is($result, qq(2|1|2),
 
 $node_subscriber->stop('fast');
 $node_publisher->stop('fast');
+
+done_testing();
index 1e0e64c0d7ac9853021960f3c6d044c95869ac6f..cf61fc1e0f605e8573728802b6f57b5d33708848 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 8;
+use Test::More;
 
 # Initialize publisher node
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
@@ -178,3 +178,5 @@ is($result, qq(0),
 
 $node_subscriber->stop('fast');
 $node_publisher->stop('fast');
+
+done_testing();
index d7513b1c612dc305e5f97fbee2742df0eef32941..38a74a897f805b4cf8451903ad93c9d72f166dc5 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 1;
+use Test::More;
 
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
 $node_publisher->init(
@@ -53,3 +53,5 @@ is( $node_subscriber->safe_psql(
 
 $node_subscriber->stop;
 $node_publisher->stop;
+
+done_testing();
index 7a86ae2d16943c143e8930a7b9890bdec8e0c835..c924ff35f7174457a8fc7eb9b54b39d0972da6a4 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 2;
+use Test::More;
 
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
 $node_publisher->init(allows_streaming => 'logical');
@@ -66,3 +66,5 @@ is( $node_subscriber->safe_psql('postgres', q{SELECT a, b, c FROM test1}),
 
 $node_subscriber->stop;
 $node_publisher->stop;
+
+done_testing();
index d1e8db3150c1d43f481680dac26c664ae8bfee79..1144b005f6df75d17468e260a37a4e3d8528f4a4 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 1;
+use Test::More;
 
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
 $node_publisher->init(allows_streaming => 'logical');
@@ -43,3 +43,5 @@ pass "subscription disable and drop in same transaction did not hang";
 
 $node_subscriber->stop;
 $node_publisher->stop;
+
+done_testing();
index c1a88911f45895bd14ecfea8e9446d5e926ea427..67b4026afa407f10e68890aced4559a9cc09a597 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 5;
+use Test::More;
 
 # Create publisher node
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
@@ -126,3 +126,5 @@ is( $node_subscriber->safe_psql(
 
 $node_subscriber->stop;
 $node_publisher->stop;
+
+done_testing();
index 8acbbce0a348463c572fc0bf19bd370a4acaceef..1ce696d4a433b5745c80eb178048013727b0dcd4 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 1;
+use Test::More;
 
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
 $node_publisher->init(allows_streaming => 'logical');
@@ -50,3 +50,5 @@ pass "materialized view data not replicated";
 
 $node_subscriber->stop;
 $node_publisher->stop;
+
+done_testing();
index 16f0031b0341f56061df24788dd8d80173eeeac9..d51924943136696b0db27e69b3fc621dd133feb0 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 14;
+use Test::More;
 
 # setup
 
@@ -239,3 +239,5 @@ is($result, qq(0||), 'truncate replicated for multiple subscriptions');
 $result = $node_subscriber->safe_psql('postgres',
        "SELECT deadlocks FROM pg_stat_database WHERE datname='postgres'");
 is($result, qq(0), 'no deadlocks detected');
+
+done_testing();
index d2900f648d87556f68f76fc289fc17771e673b16..e991a0803217384a437573cb68887015dc15c90d 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 2;
+use Test::More;
 
 # setup
 
@@ -64,3 +64,5 @@ is( $result, qq(1|22
 3|66
 4|88
 6|132), 'generated columns replicated');
+
+done_testing();
index 8eb245712ed7279e69a6e58f1e5e786bcf2bcf5f..2182f7948e4e23a0546da84c84d7233b5f6e59db 100644 (file)
@@ -9,11 +9,7 @@ use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
 use Test::More;
 
-if ($ENV{with_icu} eq 'yes')
-{
-       plan tests => 2;
-}
-else
+if ($ENV{with_icu} ne 'yes')
 {
        plan skip_all => 'ICU not supported by this build';
 }
@@ -108,3 +104,5 @@ $node_publisher->wait_for_catchup('sub1');
 is($node_subscriber->safe_psql('postgres', q{SELECT b FROM tab2}),
        qq(bar),
        'update with replica identity full with nondeterministic collation');
+
+done_testing();
index 85db48ff0a3d7e217e65daeb039cb8434d02ecc8..5266471a7aeb58c48dcc90c3bceeb66f2c53e8c2 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 63;
+use Test::More;
 
 # setup
 
@@ -740,3 +740,5 @@ ok( $logfile =~
 # $node_subscriber1->append_conf('postgresql.conf',
 #      "log_min_messages = warning");
 # $node_subscriber1->reload;
+
+done_testing();
index f3cfcbb00ef115fc4302d7c025c3c895f9636726..a1f03e7adc2ad24199659667e22eeec837e9bea4 100644 (file)
@@ -7,7 +7,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 5;
+use Test::More;
 
 # Create and initialize a publisher node
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
@@ -135,3 +135,5 @@ is( $result, '{1,2,3}|{42,1.2,1.3}|
 
 $node_subscriber->stop('fast');
 $node_publisher->stop('fast');
+
+done_testing();
index 2385803c18f80f3add72cd7185bc95b15ca957ee..9f221fc78c0c56f660659555a18c26ed93c76e85 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 4;
+use Test::More;
 
 # Create publisher node
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
@@ -133,3 +133,5 @@ is($result, qq(6667|6667|6667),
 
 $node_subscriber->stop;
 $node_publisher->stop;
+
+done_testing();
index c00b6bcc478a3e74a4add4357e4bbef9863c9ff8..f27f1694f291dc27cfeef7ea2f911f4f985c06f9 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 2;
+use Test::More;
 
 # Create publisher node
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
@@ -91,3 +91,5 @@ is($result, qq(1667|1667|1667),
 
 $node_subscriber->stop;
 $node_publisher->stop;
+
+done_testing();
index fabe033cc24b7ac86fb379b6e9c7a55cb4e2db8b..0bce63b7167c2b918c08175cfecd456b45156acd 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 3;
+use Test::More;
 
 # Create publisher node
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
@@ -127,3 +127,5 @@ is($result, qq(5005|5002|4005|3004|5),
 
 $node_subscriber->stop;
 $node_publisher->stop;
+
+done_testing();
index 6810895711a3f11bf03ec1797d694603b8b16f29..7155442e76cb234bb23f74df409cb508cc5ec800 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 4;
+use Test::More;
 
 # Create publisher node
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
@@ -131,3 +131,5 @@ is($result, qq(2500|0), 'check rollback was reflected on subscriber');
 
 $node_subscriber->stop;
 $node_publisher->stop;
+
+done_testing();
index 83e2b7ba61b58c2f5e4e0d21aa3993f0fa4fbb20..dbd0fca4d1e7a991de437f3512d42b31d8a76453 100644 (file)
@@ -7,7 +7,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 2;
+use Test::More;
 
 # Create publisher node
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
@@ -85,3 +85,5 @@ is($result, qq(1000|500),
 
 $node_subscriber->stop;
 $node_publisher->stop;
+
+done_testing();
index 9bb31ce9e874a4900fba66581bf8f84e07da957a..b5045ff3c43cb6f065e518033b86e9f0d7c3697c 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 5;
+use Test::More;
 
 # Create publisher node
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
@@ -146,3 +146,5 @@ is( $result, qq(77|0
 
 $node_subscriber->stop('fast');
 $node_publisher->stop('fast');
+
+done_testing();
index 88ef341825be29ddd29272419b7e8e15a03c4364..aacc0fcf46275b5e76e85e0a655a9ce58444c7c1 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 24;
+use Test::More;
 
 ###############################
 # Setup
@@ -359,3 +359,5 @@ is($result, qq(0), 'check replication origin was dropped on subscriber');
 
 $node_subscriber->stop('fast');
 $node_publisher->stop('fast');
+
+done_testing();
index 80680f06a0ee8a2194cb72e974b0392e0f9d9219..900c25d5ce257266bd275ec0ef55381eaa5c474d 100644 (file)
@@ -9,7 +9,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 41;
+use Test::More;
 
 ###############################
 # Setup a cascade of pub/sub nodes.
@@ -394,3 +394,5 @@ is($result, qq(0), 'check replication slot was dropped on publisher node A');
 $node_C->stop('fast');
 $node_B->stop('fast');
 $node_A->stop('fast');
+
+done_testing();
index 250fdd550d631bc19a09d43323e55b1be5d0ee50..93ce3ef132d32915d995e7ea5a8625c8f9d1e1f9 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 18;
+use Test::More;
 
 ###############################
 # Setup
@@ -282,3 +282,5 @@ is($result, qq(0), 'check replication origin was dropped on subscriber');
 
 $node_subscriber->stop('fast');
 $node_publisher->stop('fast');
+
+done_testing();
index 015cabf906100c9279b95feb4eade0069b91c65f..561ddde42160e33c18da71e543067178c926b6cb 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 3;
+use Test::More;
 
 # Initialize publisher node
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
@@ -96,3 +96,5 @@ is($result, qq(20|1|10), 'check initial data is copied to subscriber');
 # shutdown
 $node_subscriber->stop('fast');
 $node_publisher->stop('fast');
+
+done_testing();
index 197d68aafd1799ffe0fec60e46b89708073bc8ac..2a6ba5403dafaac502374586cc3c73d2b1d88930 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 13;
+use Test::More;
 
 # Initialize publisher node
 my $node_publisher = PostgreSQL::Test::Cluster->new('publisher');
@@ -203,3 +203,5 @@ is($result, qq(21|1|21), 'check replicated inserts on subscriber');
 
 $node_subscriber->stop('fast');
 $node_publisher->stop('fast');
+
+done_testing();
index 6cf21c8feeabbcd64ddfad28ca01bf91d6c0723d..f72e4766e830c1152a26b851a1eb9a9c5bb7aebc 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 3;
+use Test::More;
 
 # Test if the error reported on pg_stat_subscription_workers view is expected.
 sub test_subscription_error
@@ -161,3 +161,5 @@ is($result, q(0), 'no error after dropping subscription');
 
 $node_subscriber->stop('fast');
 $node_publisher->stop('fast');
+
+done_testing();
index 4902542b5ead9cf58cb84f8ad0d1aa175f26b148..4815e6ccffe8acfbf1159e3806b9e39b3fdae21b 100644 (file)
@@ -5,7 +5,7 @@
 use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
-use Test::More tests => 14;
+use Test::More;
 
 my ($node_publisher, $node_subscriber, $publisher_connstr, $result, $offset);
 $offset = 0;
@@ -278,3 +278,5 @@ publish_delete("alice.unpartitioned", 17);
 expect_replication(
     "alice.unpartitioned", 2, 23, 25,
     "nosuperuser nobypassrls table owner can replicate delete into unpartitioned despite rls");
+
+done_testing();
index dc361756cc9be828184cf1d6beccc1a2687d873d..11ba47371596c939842aad4e5328dbe31d2b1b5f 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 use warnings;
 use PostgreSQL::Test::Cluster;
 use PostgreSQL::Test::Utils;
-use Test::More tests => 7;
+use Test::More;
 
 # Bug #15114
 
@@ -306,3 +306,5 @@ is( $node_subscriber->safe_psql(
 
 $node_publisher->stop('fast');
 $node_subscriber->stop('fast');
+
+done_testing();