mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #42785 from akshaymohite/smart-parallel-tests-patch
Used already defined method parallelized? and fixed semantics of test name.
This commit is contained in:
commit
c2669b85ba
2 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ module ActiveSupport
|
||||||
end
|
end
|
||||||
|
|
||||||
def execution_info
|
def execution_info
|
||||||
if should_parallelize?
|
if parallelized?
|
||||||
"Running #{tests_count} tests in parallel using #{parallel_executor.size} #{parallelize_with}"
|
"Running #{tests_count} tests in parallel using #{parallel_executor.size} #{parallelize_with}"
|
||||||
else
|
else
|
||||||
"Running #{tests_count} tests in a single process (parallelization threshold is #{ActiveSupport.test_parallelization_minimum_number_of_tests})"
|
"Running #{tests_count} tests in a single process (parallelization threshold is #{ActiveSupport.test_parallelization_minimum_number_of_tests})"
|
||||||
|
|
|
@ -571,7 +571,7 @@ module ApplicationTests
|
||||||
assert_no_match "create_table(:users)", output
|
assert_no_match "create_table(:users)", output
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_avoid_paralleling_when_number_of_tests_if_below_threshold
|
def test_avoid_parallelizing_when_number_of_tests_is_below_threshold
|
||||||
exercise_parallelization_regardless_of_machine_core_count(with: :processes, threshold: 100)
|
exercise_parallelization_regardless_of_machine_core_count(with: :processes, threshold: 100)
|
||||||
|
|
||||||
file_name = create_parallel_processes_test_file
|
file_name = create_parallel_processes_test_file
|
||||||
|
|
Loading…
Reference in a new issue