grosser / parallel_tests

Ruby: 2 CPUs = 2x Testing Speed for RSpec, Test::Unit and Cucumber
3.39k stars 495 forks source link

Feature request: `--only-group` equivalent for `parallel:setup` #965

Closed mattyb closed 4 months ago

mattyb commented 4 months ago

We split our tests into 12 groups, running 4 in each of 3 circle CI jobs. We use parallel:setup to create the databases, but that means it spends time creating all 12 in each job. We also found database connection issues when trying to set up over 12 databases in parallel. I'm sure we could tune the database, but it seems like more evidence that we shouldn't be trying to create extra databases we don't need.

It would be great if there was a parameter equivalent to --only-group to speed up our setup and address the connections issue.

grosser commented 4 months ago

rake parallel:setup[4] should do the trick

mattyb commented 4 months ago

Thanks for the quick reply @grosser ! As I understand it though, that would work for the first job where we're running groups 0-3, but not for the next two jobs where we're running groups 4-7 or 8-11. Does that sound right?

grosser commented 4 months ago

I think it should just work, give it a try ... maybe locally at first it should use the first 4 dbs when running 4 groups