benkasminbullock / json-create

https://metacpan.org/release/JSON-Create
1 stars 4 forks source link

Make tests parallel-safe #47

Closed ppisar closed 3 years ago

ppisar commented 3 years ago

t/write-json.t writes into a temporary file. t/zz-pure-perl.t executes t/write-json.t. If tests are run in parallel, t/write-json.t can run twice an trip over the same file.

This patch fixes it by creating a temporary directory whose name unique. File::Temp also removes the directory automatically.

benkasminbullock commented 3 years ago

Thank you for this contribution. It will go in the next release to CPAN. I don't have a schedule for a release yet. If you need it to be released to CPAN more quickly, let me know.

benkasminbullock commented 3 years ago

I found another bug in the module today involving numbers, so I need to release a new version to CPAN for that, so your fix will be on CPAN shortly as testing version 0.32_01, then 0.33 shortly if the tests are OK.