On Thu, Apr 18, 2024 at 06:03:45AM -0400, Andrew Dunstan wrote: > On 2024-04-18 Th 02:04, Michael Paquier wrote: >> Why usingFile::Temp::tempfile here? Couldn't you just use a >> file in a PostgreSQL::Test::Utils::tempdir() that would be cleaned up >> once the test finishes? > > That's another possibility, but I think the above is the simplest.
Are you sure that relying on Temp::File is a good thing overall? The current temporary file knowledge is encapsulated within Utils.pm, with files removed or kept depending on PG_TEST_NOCLEAN. So it would be just more consistent to rely on the existing facilities instead? test_json_parser is the only code path in the whole tree that directly uses File::Temp. The rest of the TAP tests relies on Utils.pm for temp file paths. -- Michael
signature.asc
Description: PGP signature