Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit30d98e1

Browse files
committed
If wait_for_catchup fails under has_wal_read_bug, skip balance of test.
Test files should now ignore has_wal_read_bug() so long aswait_for_catchup() is their only known way of reaching the bug. That'sat least five files today, a number expected to grow over time. Thiscommit removes skip logic from three. By doing so, systems having thebug regain the ability to catch other kinds of defects via those threetests. The other two, 002_databases.pl and 031_recovery_conflict.pl,have been unprotected. Back-patch to v15, where done_testing() firstbecame our standard.Discussion:https://postgr.es/m/20221030031639.GA3082137@rfd.leadboat.com
1 parent533e02e commit30d98e1

File tree

4 files changed

+17
-23
lines changed

4 files changed

+17
-23
lines changed

‎contrib/bloom/t/001_wal.pl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@
88
use PostgreSQL::Test::Utils;
99
use Test::More;
1010

11-
if (PostgreSQL::Test::Utils::has_wal_read_bug)
12-
{
13-
# We'd prefer to use Test::More->builder->todo_start, but the bug causes
14-
# this test file to die(), not merely to fail.
15-
planskip_all=>'filesystem bug';
16-
}
17-
1811
my$node_primary;
1912
my$node_standby;
2013

‎src/test/perl/PostgreSQL/Test/Cluster.pm

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,8 +2606,23 @@ sub wait_for_catchup
26062606
my$query =qq[SELECT '$target_lsn' <=${mode}_lsn AND state = 'streaming'
26072607
FROM pg_catalog.pg_stat_replication
26082608
WHERE application_name IN ('$standby_name', 'walreceiver')];
2609-
$self->poll_query_until('postgres',$query)
2610-
or croak"timed out waiting for catchup";
2609+
if (!$self->poll_query_until('postgres',$query))
2610+
{
2611+
if (PostgreSQL::Test::Utils::has_wal_read_bug)
2612+
{
2613+
# Mimic having skipped the test file. If >0 tests have run, the
2614+
# harness won't accept a skip; otherwise, it won't accept
2615+
# done_testing(). Force a nonzero count by running one test.
2616+
ok(1,'dummy test before skip for filesystem bug');
2617+
carp"skip rest: timed out waiting for catchup & filesystem bug";
2618+
done_testing();
2619+
exit 0;
2620+
}
2621+
else
2622+
{
2623+
croak"timed out waiting for catchup";
2624+
}
2625+
}
26112626
print"done\n";
26122627
return;
26132628
}

‎src/test/recovery/t/027_stream_regress.pl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@
66
use Test::More;
77
use File::Basename;
88

9-
if (PostgreSQL::Test::Utils::has_wal_read_bug)
10-
{
11-
# We'd prefer to use Test::More->builder->todo_start, but the bug causes
12-
# this test file to die(), not merely to fail.
13-
planskip_all=>'filesystem bug';
14-
}
15-
169
# Initialize primary node
1710
my$node_primary = PostgreSQL::Test::Cluster->new('primary');
1811
$node_primary->init(allows_streaming=> 1);

‎src/test/recovery/t/032_relfilenode_reuse.pl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@
55
use Test::More;
66
use File::Basename;
77

8-
if (PostgreSQL::Test::Utils::has_wal_read_bug)
9-
{
10-
# We'd prefer to use Test::More->builder->todo_start, but the bug causes
11-
# this test file to die(), not merely to fail.
12-
planskip_all=>'filesystem bug';
13-
}
14-
158

169
my$node_primary = PostgreSQL::Test::Cluster->new('primary');
1710
$node_primary->init(allows_streaming=> 1);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp