I'm trying to enable parallelization of tests in my rails app, but for some reason one of the test breaks as soon as I enable it:
ERROR["test_convert_to_letter", Minitest::Result, 1.8716010000061942]
test_convert_to_letter#Minitest::Result (1.87s)
Minitest::UnexpectedError: Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/yasirguzman/development/chitchats/tmp/nil.i5j9z3i7x13r.pdf
app/services/convert_png_label_to_pdf_service.rb:19:in `read'
app/services/convert_png_label_to_pdf_service.rb:19:in `read'
app/services/convert_png_label_to_pdf_service.rb:19:in `block in convert'
app/services/temp_file_service.rb:15:in `temp_path'
app/services/convert_png_label_to_pdf_service.rb:11:in `convert'
test/services/convert_png_label_to_pdf_service_test.rb:8:in `block in <class:ConvertPNGLabelToPDFServiceTest>'
as soon as I disable parallel testing it succeeds.
I'm using parallelize(workers: :number_of_processors) in the test_helper.rb
Rails doesn't provide much documentation for parallel testing but I guess there's some kind of configuration that needs to be done so that File operations execute properly but i'm not sure what to do at this point, I'd appreciate any idea or suggestion on how to tackle this issue, thanks.