Puma takes 5 min to load when running test:system; but not when running test:all

When running rails test:system or rails test test/system/specific_test_file.rb it appears that it takes Puma 5 minutes to load. But if I run rails test:all (which also runs the system tests) then this delay does not seem to happen.

If anyone could point me to the differences in how puma might be getting loaded in the 2 different scenarios, I’d very much appreciate it!

I think the cause can include the order in which Rails loads the tests, the way Rails boots a new Puma server for each system test, and the additional dependencies the system tests may require Puma to load.

Try running the system tests in parallel, using a pre-loaded Puma server, or reducing the number of system tests.