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

Commita029a06

Browse files
committed
Fix test case instability introduced in085b6b6.
I forgot that the WAL directory might hold other files besides WALsegments, notably including new segments still being filled.That means a blind test for the first file's size being 16MB canfail. Restrict based on file name length to make it more robust.Per buildfarm.
1 parentb08dee2 commita029a06

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎src/test/regress/expected/misc_functions.out

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ select count(*) > 0 as ok from (select * from pg_ls_waldir() limit 1) ss;
167167
t
168168
(1 row)
169169

170-
select (pg_ls_waldir()).size = :segsize as ok limit 1;
170+
select (w).size = :segsize as ok
171+
from (select pg_ls_waldir() w) ss where length((w).name) = 24 limit 1;
171172
ok
172173
----
173174
t

‎src/test/regress/sql/misc_functions.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ select count(*) > 0 as ok from (select pg_ls_waldir()) ss;
4646
-- Test not-run-to-completion cases.
4747
select*from pg_ls_waldir()limit0;
4848
selectcount(*)>0as okfrom (select*from pg_ls_waldir()limit1) ss;
49-
select (pg_ls_waldir()).size= :segsizeas oklimit1;
49+
select (w).size= :segsizeas ok
50+
from (select pg_ls_waldir() w) sswhere length((w).name)=24limit1;
5051

5152
selectcount(*)>=0as okfrom pg_ls_archive_statusdir();
5253

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp