Local failures (race condition) in railties/test/application/server_test.rb

I’m working on fixing up some tests that are failing in local development environments, but passing in buildkite. The latest failures I’m ironing out are in railties.

The two tests in railties/test/application/server_test.rb

  • cannot run in parallel
  • or, cannot use the same port

Both tests boot a rails server process to bind to localhost:3000. The tests run in parallel, forked.

I’ve proposed running those two tests in serial in a PR:

But, if it’s preferred that they continue to run in parallel, would the accepted change be to specify a port other than 3000 for one of the tests?

I was thinking running these tests serially would make the file resilient to copy-pasta of another test case.