diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-11-16 21:25:14 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-11-17 13:56:51 +0900 |
commit | 90266a7f1eff7c873cba7044fa0a4487b2a6ff84 (patch) | |
tree | 4699208d26dbdf0da30e43e79b768b541741f5cf /activesupport/test/abstract_unit.rb | |
parent | ef5478d326d78d1e2b567c23b4a7c16b69dc72b2 (diff) | |
download | rails-90266a7f1eff7c873cba7044fa0a4487b2a6ff84.tar.gz rails-90266a7f1eff7c873cba7044fa0a4487b2a6ff84.tar.bz2 rails-90266a7f1eff7c873cba7044fa0a4487b2a6ff84.zip |
Correctly handle unknown object in parallel tests
DRb wraps in `DRbUnknown` if the data contains a type that can not be
resolved locally. This can happen if an error occurs in the test and the
error class can not be resolved on the server side.
When this happens, an instance of `DRbUnknown` is passed to the `result`
of `Server#record`. This causes another error(undefined method assertions
for #<DRb::DRbUnknown:> (NoMethodError)) in `reporter.record`.
This can confirm by the following steps.
```
$ rails new app -B --dev; cd app
$ rails g scaffold user name:string
$ edit `config.action_controller.allow_forgery_protection = true` in environments/test.rb
$ bin/rails t
```
In the case of `DRbUnknown` occurs, can't resolve error exception. So wrap
exception with `DRbRemoteError` in the same way as an unmarshalled object.
Diffstat (limited to 'activesupport/test/abstract_unit.rb')
0 files changed, 0 insertions, 0 deletions