]> source.dussan.org Git - redmine.git/commitdiff
Allow parallel testing (#35030).
authorGo MAEDA <maeda@farend.jp>
Tue, 6 Apr 2021 06:27:42 +0000 (06:27 +0000)
committerGo MAEDA <maeda@farend.jp>
Tue, 6 Apr 2021 06:27:42 +0000 (06:27 +0000)
Patch by Go MAEDA.

git-svn-id: http://svn.redmine.org/redmine/trunk@20920 e93f8b46-1217-0410-a6f0-8f06a7374b81

doc/RUNNING_TESTS
test/test_helper.rb

index 35e271a345ecddd0de841399428f1c2409fd40e4..fa4737e11eeb75b5b863f62d88505769c0a2dfca 100644 (file)
@@ -14,6 +14,10 @@ Apache perl module Redmine.pm and Capybara tests, see below).
 You can run `ruby test/unit/issue_test.rb` for running a single test case and
 `ruby test/unit/issue_test.rb -n test_create` for running a single test.
 
+You can run tests in parallel by setting the PARALLEL_WORKERS environment
+variable:
+`PARALLEL_WORKERS=8 rake test`
+
 Before running tests, you need to configure both development
 and test databases.
 
index 10f4f6e352f0ae3eb85c809eee9852bd1d3d7149..95b877d449574e16652d3fad4e330fec7d45da88 100644 (file)
@@ -53,6 +53,8 @@ class ActionView::TestCase
 end
 
 class ActiveSupport::TestCase
+  parallelize(workers: 1)
+
   include ActionDispatch::TestProcess
 
   self.use_transactional_tests = true