I have the same problems with reliability of the parallel system tests. When on CI and using different nodes could be done with setting PARALLEL_WORKERS env variable.
Interestingly this is not just a Rails problem. When I was playing with writing a web scraper in Rust a while back, Rust’s test parallelization caused ALLLLLLLL kinds of failures. The root cause there was that the chromedriver process was a contended resource between threads.
I’m really curious about what mechanisms Eileen (?) has put in place here to make this work to even the degree it does. I found it to be a difficult enough problem in Rust, and Rust has a lot more affordances for getting control over parallelization issues than Ruby does.