未验证 提交 317bf45c 编写于 作者: E Eileen M. Uchitelle 提交者: GitHub

Merge pull request #34476 from y-yagi/fix_no_method_error_in_parallelization

Correctly handle unknown object in parallel tests
......@@ -15,6 +15,8 @@ def initialize
end
def record(reporter, result)
raise DRb::DRbConnError if result.is_a?(DRb::DRbUnknown)
reporter.synchronize do
reporter.record(result)
end
......
......@@ -586,6 +586,20 @@ def initialize
assert_match "1 runs, 0 assertions, 0 failures, 1 errors", output
end
def test_run_in_parallel_with_unknown_object
create_scaffold
app_file "config/environments/test.rb", <<-RUBY
Rails.application.configure do
config.action_controller.allow_forgery_protection = true
config.action_dispatch.show_exceptions = false
end
RUBY
output = run_test_command("-n test_should_create_user")
assert_match "ActionController::InvalidAuthenticityToken", output
end
def test_raise_error_when_specified_file_does_not_exist
error = capture(:stderr) { run_test_command("test/not_exists.rb", stderr: true) }
assert_match(%r{cannot load such file.+test/not_exists\.rb}, error)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册