Address `DEPRECATED: use MT_CPU instead of N for parallel test runs`

* Steps to reproduce

```ruby
% cd actionpack
% N=0 bundle exec ruby -w -Itest test/controller/mime/accept_format_test.rb
DEPRECATED: use MT_CPU instead of N for parallel test runs
... snip ...
%
```

* minitest 5.12.0 deprecates ENV["N"] to specify number of parallel test
runners:

https://github.com/seattlerb/minitest/blob/master/History.rdoc#5120--2019-09-22
4103a10eb4

* No other code uses `ENV["N"]`
```
% git grep 'ENV\["N"\]'
actionpack/test/abstract_unit.rb:  PROCESS_COUNT = (ENV["N"] || 4).to_i
%
```

* Rails guide suggests using `PARALLEL_WORKERS` to specify the number of workers, not `N`
https://guides.rubyonrails.org/testing.html#parallel-testing
https://guides.rubyonrails.org/testing.html#parallel-testing

```ruby
PARALLEL_WORKERS=15 rails test
```
This commit is contained in:
Yasuo Honda 2019-12-28 12:39:37 +09:00
parent f718ab6c72
commit 1a41a741cf
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ end
if ENV["TRAVIS"]
PROCESS_COUNT = 0
else
PROCESS_COUNT = (ENV["N"] || 4).to_i
PROCESS_COUNT = (ENV["MT_CPU"] || 4).to_i
end
require "active_support/testing/autorun"