rubygems.org icon indicating copy to clipboard operation
rubygems.org copied to clipboard

Enable parallel tests

Open colby-swandale opened this issue 1 year ago • 3 comments

Currently, tests are run in serial and take several minutes to complete running (assuming no flaky specs), which leads to a long wait time for feedback. We should look to enable parallel tests described in https://guides.rubyonrails.org/testing.html#parallel-testing-with-processes to help cut down the wait time.

Discussed at RubyConf SD

colby-swandale avatar Nov 13 '23 22:11 colby-swandale

If I remember well, it was tried few times, but there were various problems like memcached, OpenSearch and ToxiProxy isolation. It is not as simple as enabling it or introducing parallel_tests gem. In current setup CI runs around 7 minutes which is still manageable IMHO.

simi avatar Nov 13 '23 22:11 simi

If I remember well, it was tried few times, but there were various problems like memcached, OpenSearch and ToxiProxy isolation. It is not as simple as enabling it or introducing parallel_tests gem.

I understand and this should be manageable with the right separation concerns in the test suite.

In current setup CI runs around 7 minutes which is still manageable IMHO.

I've worked with Rails apps that take 20mins to go through all the tests, so the RubyGems.org test suit is fast for sure! But I think we can still strive for improvements to make it the best codebase we can.

colby-swandale avatar Nov 13 '23 22:11 colby-swandale

I understand and this should be manageable with the right separation concerns in the test suite.

Yup, not saying it is impossible. Just sharing my experience. I tried at the beginning of this year and gave up after few hours.

simi avatar Nov 13 '23 22:11 simi