Skip to content

Commit 43dca8a

Browse files
committed
tests: Cope with WARNINGs during failed CREATE DB on windows
The test added in 93bc3d7 sometimes fails on windows, due to warnings like WARNING: some useless files may be left behind in old database directory "base/16514" The reason for that is createdb_failure_callback() does not ensure that there are no open file descriptors for files in the partially created, to-be-dropped, database. We do take care in dropdb(), but that involves waiting for checkpoints and a ProcSignalBarrier, which we probably don't want to do in an error callback. This should probably be fixed one day, but for now 001_aio.pl needs to cope. Per buildfarm animals fairywren and drongo. Discussion: https://postgr.es/m/uc62i6vi5gd4bi6wtjj5poadqxolgy55e7ihkmf3mthjegb6zl@zqo7xez7sc2r
1 parent eec0040 commit 43dca8a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/test/modules/test_aio/t/001_aio.pl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,11 @@ sub test_checksum_createdb
12791279

12801280
# Verify that CREATE DATABASE of an invalid database fails and is
12811281
# accounted for accurately.
1282+
#
1283+
# Note: On windows additional WARNING messages might be printed, due to
1284+
# "some useless files may be left behind" warnings. While we probably
1285+
# should prevent those from occurring, they're independent of AIO, so we
1286+
# shouldn't fail because of them here.
12821287
my ($cs_count_before, $cs_ts_before) =
12831288
checksum_failures($psql, 'regression_createdb_source');
12841289
psql_like(
@@ -1287,7 +1292,7 @@ sub test_checksum_createdb
12871292
"create database w/ wal strategy, invalid source",
12881293
$createdb_sql,
12891294
qr/^$/,
1290-
qr/^psql:<stdin>:\d+: ERROR: invalid page in block 1 of relation base\/\d+\/\d+$/
1295+
qr/psql:<stdin>:\d+: ERROR: invalid page in block 1 of relation base\/\d+\/\d+$/
12911296
);
12921297
my ($cs_count_after, $cs_ts_after) =
12931298
checksum_failures($psql, 'regression_createdb_source');

0 commit comments

Comments
 (0)