aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/bloom/t/001_wal.pl7
-rw-r--r--src/test/perl/PostgreSQL/Test/Cluster.pm19
-rw-r--r--src/test/recovery/t/027_stream_regress.pl7
-rw-r--r--src/test/recovery/t/032_relfilenode_reuse.pl7
4 files changed, 17 insertions, 23 deletions
diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl
index f7f16dc5fa2..9416a64dbd6 100644
--- a/contrib/bloom/t/001_wal.pl
+++ b/contrib/bloom/t/001_wal.pl
@@ -8,13 +8,6 @@ use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Test::More;
-if (PostgreSQL::Test::Utils::has_wal_read_bug)
-{
- # We'd prefer to use Test::More->builder->todo_start, but the bug causes
- # this test file to die(), not merely to fail.
- plan skip_all => 'filesystem bug';
-}
-
my $node_primary;
my $node_standby;
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index d80134b26f3..d1017b746fc 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -2606,8 +2606,23 @@ sub wait_for_catchup
my $query = qq[SELECT '$target_lsn' <= ${mode}_lsn AND state = 'streaming'
FROM pg_catalog.pg_stat_replication
WHERE application_name IN ('$standby_name', 'walreceiver')];
- $self->poll_query_until('postgres', $query)
- or croak "timed out waiting for catchup";
+ if (!$self->poll_query_until('postgres', $query))
+ {
+ if (PostgreSQL::Test::Utils::has_wal_read_bug)
+ {
+ # Mimic having skipped the test file. If >0 tests have run, the
+ # harness won't accept a skip; otherwise, it won't accept
+ # done_testing(). Force a nonzero count by running one test.
+ ok(1, 'dummy test before skip for filesystem bug');
+ carp "skip rest: timed out waiting for catchup & filesystem bug";
+ done_testing();
+ exit 0;
+ }
+ else
+ {
+ croak "timed out waiting for catchup";
+ }
+ }
print "done\n";
return;
}
diff --git a/src/test/recovery/t/027_stream_regress.pl b/src/test/recovery/t/027_stream_regress.pl
index 7982ac08d0a..69d6ddf2810 100644
--- a/src/test/recovery/t/027_stream_regress.pl
+++ b/src/test/recovery/t/027_stream_regress.pl
@@ -6,13 +6,6 @@ use PostgreSQL::Test::Utils;
use Test::More;
use File::Basename;
-if (PostgreSQL::Test::Utils::has_wal_read_bug)
-{
- # We'd prefer to use Test::More->builder->todo_start, but the bug causes
- # this test file to die(), not merely to fail.
- plan skip_all => 'filesystem bug';
-}
-
# Initialize primary node
my $node_primary = PostgreSQL::Test::Cluster->new('primary');
$node_primary->init(allows_streaming => 1);
diff --git a/src/test/recovery/t/032_relfilenode_reuse.pl b/src/test/recovery/t/032_relfilenode_reuse.pl
index 499ec34a7aa..92ec510037a 100644
--- a/src/test/recovery/t/032_relfilenode_reuse.pl
+++ b/src/test/recovery/t/032_relfilenode_reuse.pl
@@ -5,13 +5,6 @@ use PostgreSQL::Test::Utils;
use Test::More;
use File::Basename;
-if (PostgreSQL::Test::Utils::has_wal_read_bug)
-{
- # We'd prefer to use Test::More->builder->todo_start, but the bug causes
- # this test file to die(), not merely to fail.
- plan skip_all => 'filesystem bug';
-}
-
my $node_primary = PostgreSQL::Test::Cluster->new('primary');
$node_primary->init(allows_streaming => 1);